mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
fix(transformer): TypeScriptOptions deserialize should fallback to default (#3012)
This commit is contained in:
parent
b72bdcaf96
commit
722d4c2350
3 changed files with 5 additions and 11 deletions
|
|
@ -16,7 +16,7 @@ use crate::context::Ctx;
|
|||
use self::{annotations::TypeScriptAnnotations, collector::TypeScriptReferenceCollector};
|
||||
|
||||
#[derive(Debug, Default, Clone, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[serde(default, rename_all = "camelCase")]
|
||||
pub struct TypeScriptOptions {
|
||||
/// When set to true, the transform will only remove type-only imports (introduced in TypeScript 3.8).
|
||||
/// This should only be used if you are using TypeScript >= 3.8.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Passed: 140/209
|
||||
Passed: 148/209
|
||||
|
||||
# All Passed:
|
||||
* babel-plugin-transform-react-jsx-source
|
||||
|
|
@ -17,9 +17,7 @@ Passed: 140/209
|
|||
* opts/optimizeConstEnums/input.ts
|
||||
* opts/rewriteImportExtensions/input.ts
|
||||
|
||||
# babel-plugin-transform-typescript (84/139)
|
||||
* class/abstract-allowDeclareFields-false/input.ts
|
||||
* class/abstract-allowDeclareFields-true/input.ts
|
||||
# babel-plugin-transform-typescript (92/139)
|
||||
* class/accessor-allowDeclareFields-false/input.ts
|
||||
* class/accessor-allowDeclareFields-true/input.ts
|
||||
* class/parameter-properties/input.ts
|
||||
|
|
@ -33,7 +31,6 @@ Passed: 140/209
|
|||
* imports/enum-value/input.ts
|
||||
* imports/import=-module/input.ts
|
||||
* imports/type-only-export-specifier-2/input.ts
|
||||
* namespace/alias/input.ts
|
||||
* namespace/ambient-module-nested/input.ts
|
||||
* namespace/ambient-module-nested-exported/input.ts
|
||||
* namespace/canonical/input.ts
|
||||
|
|
@ -42,14 +39,10 @@ Passed: 140/209
|
|||
* namespace/clobber-export/input.ts
|
||||
* namespace/clobber-import/input.ts
|
||||
* namespace/contentious-names/input.ts
|
||||
* namespace/declare/input.ts
|
||||
* namespace/declare-global-nested-namespace/input.ts
|
||||
* namespace/empty-removed/input.ts
|
||||
* namespace/export/input.ts
|
||||
* namespace/export-type-only/input.ts
|
||||
* namespace/module-nested/input.ts
|
||||
* namespace/module-nested-export/input.ts
|
||||
* namespace/multiple/input.ts
|
||||
* namespace/mutable-fail/input.ts
|
||||
* namespace/namespace-flag/input.ts
|
||||
* namespace/namespace-nested-module/input.ts
|
||||
|
|
@ -59,7 +52,6 @@ Passed: 140/209
|
|||
* namespace/nested-shorthand/input.ts
|
||||
* namespace/nested-shorthand-export/input.ts
|
||||
* namespace/same-name/input.ts
|
||||
* namespace/undeclared/input.ts
|
||||
* optimize-const-enums/custom-values/input.ts
|
||||
* optimize-const-enums/custom-values-exported/input.ts
|
||||
* optimize-const-enums/declare/input.ts
|
||||
|
|
|
|||
|
|
@ -352,6 +352,8 @@ impl TestCase for ConformanceTestCase {
|
|||
println!("{output}\n");
|
||||
println!("Transformed:\n");
|
||||
println!("{transformed_code}");
|
||||
println!("Errors:\n");
|
||||
println!("{actual_errors}\n");
|
||||
if !passed {
|
||||
println!("Diff:\n");
|
||||
print_diff_in_terminal(&output, &transformed_code);
|
||||
|
|
|
|||
Loading…
Reference in a new issue