From 3958f1792c4598e965f36a11c567c95f69984a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 12 Jun 2023 17:02:34 +0900 Subject: [PATCH] refactor(es/ast): Remove unused fields (#7518) **Related issue:** - Closes #7347. - Closes #7487. --- crates/swc_bundler/src/bundler/keywords.rs | 1 - crates/swc_ecma_ast/src/pat.rs | 3 - crates/swc_ecma_ast/src/typescript.rs | 1 - .../src/rules/duplicate_exports.rs | 2 +- crates/swc_ecma_parser/src/parser/expr.rs | 8 +- crates/swc_ecma_parser/src/parser/pat.rs | 5 - crates/swc_ecma_parser/src/parser/stmt.rs | 8 +- .../swc_ecma_parser/src/parser/typescript.rs | 1 - .../tests/tsc/ES5For-of26.json | 6 +- .../tests/tsc/ES5For-of27.json | 6 +- .../tests/tsc/ES5For-of28.json | 6 +- .../tests/tsc/ES5For-of29.json | 6 +- .../tests/tsc/ES5For-of30.json | 6 +- .../tests/tsc/ES5For-of31.json | 6 +- .../tests/tsc/ES5For-of35.json | 6 +- .../tests/tsc/ES5For-of36.json | 6 +- .../tests/tsc/FunctionDeclaration3_es6.json | 3 +- ...WithExportedAndNonExportedImportAlias.json | 2 - .../tsc/ambientDeclarationsExternal.json | 2 - .../tsc/ambientExternalModuleMerging.json | 1 - .../tests/tsc/ambientShorthand.json | 1 - .../tsc/amdImportAsPrimaryExpression.json | 1 - .../tsc/amdImportNotAsPrimaryExpression.json | 2 - .../argumentExpressionContextualTyping.json | 3 +- .../tests/tsc/arrowFunctionExpressions.json | 6 +- .../tests/tsc/assignmentTypeNarrowing.json | 6 +- .../tests/tsc/asyncArrowFunction3_es2017.json | 3 +- .../tests/tsc/asyncArrowFunction3_es5.json | 3 +- .../tests/tsc/asyncArrowFunction3_es6.json | 3 +- .../tsc/asyncFunctionDeclaration3_es2017.json | 3 +- .../tsc/asyncFunctionDeclaration3_es5.json | 3 +- .../tsc/asyncFunctionDeclaration3_es6.json | 3 +- .../tests/tsc/asyncWithVarShadowing_es6.json | 9 +- .../tests/tsc/bundlerSyntaxRestrictions.json | 2 - .../tsc/checkExportsObjectAssignProperty.json | 2 - ...kExportsObjectAssignPrototypeProperty.json | 1 - .../checkJsdocTypeTagOnObjectProperty2.json | 3 +- .../tests/tsc/checkObjectDefineProperty.json | 7 +- .../tests/tsc/circularImportAlias.json | 2 - .../tests/tsc/circularReference.json | 2 - .../tests/tsc/cjsImportInES2015.json | 1 - .../tsc/classAbstractImportInstantiation.json | 1 - ...taticFieldInParameterBindingPattern.2.json | 9 +- ...taticFieldInParameterBindingPattern.3.json | 9 +- ...hStaticFieldInParameterBindingPattern.json | 3 +- ...thStaticFieldInParameterInitializer.2.json | 9 +- ...thStaticFieldInParameterInitializer.3.json | 9 +- ...WithStaticFieldInParameterInitializer.json | 3 +- .../commonJSImportAsPrimaryExpression.json | 1 - .../commonJSImportNotAsPrimaryExpression.json | 2 - ...nstructorDefaultValuesReferencingThis.json | 9 +- ...ructorImplementationWithDefaultValues.json | 9 +- ...uctorImplementationWithDefaultValues2.json | 12 +- ...constructorOverloadsWithDefaultValues.json | 6 +- .../contextuallyTypedBindingInitializer.json | 9 +- ...tuallyTypedBindingInitializerNegative.json | 15 +- .../tests/tsc/contextuallyTypedIife.json | 12 +- .../tsc/contextuallyTypedIifeStrict.json | 12 +- .../controlFlowAssignmentPatternOrder.json | 36 ++--- .../tests/tsc/controlFlowBindingElement.json | 3 +- .../tsc/controlFlowBindingPatternOrder.json | 15 +- .../controlFlowDestructuringDeclaration.json | 6 +- .../tests/tsc/controlFlowParameter.json | 18 +-- .../tests/tsc/declarationsAndAssignments.json | 33 ++-- ...gArrayBindingPatternAndAssignment1ES5.json | 6 +- ...ndingPatternAndAssignment1ES5iterable.json | 6 +- ...gArrayBindingPatternAndAssignment1ES6.json | 6 +- ...ringArrayBindingPatternAndAssignment2.json | 3 +- ...ringArrayBindingPatternAndAssignment3.json | 36 ++--- .../tsc/destructuringEvaluationOrder.json | 12 +- ...jectAssignmentPatternWithNestedSpread.json | 3 +- ...ObjectBindingPatternAndAssignment1ES5.json | 3 +- ...ObjectBindingPatternAndAssignment1ES6.json | 3 +- ...destructuringParameterDeclaration1ES5.json | 33 ++-- ...uringParameterDeclaration1ES5iterable.json | 33 ++-- ...destructuringParameterDeclaration1ES6.json | 30 ++-- .../destructuringParameterDeclaration5.json | 6 +- .../destructuringVariableDeclaration1ES5.json | 24 +-- ...turingVariableDeclaration1ES5iterable.json | 24 +-- .../destructuringVariableDeclaration1ES6.json | 24 +-- .../destructuringVariableDeclaration2.json | 9 +- .../destructuringWithLiteralInitializers.json | 36 ++--- ...destructuringWithLiteralInitializers2.json | 129 ++++++---------- .../tests/tsc/emitArrowFunction.json | 3 +- .../tests/tsc/emitArrowFunctionES6.json | 9 +- .../emitClassDeclarationOverloadInES6.json | 3 +- ...tClassDeclarationWithConstructorInES6.json | 3 +- ...mitClassDeclarationWithExtensionInES6.json | 3 +- .../tsc/emitDefaultParametersFunction.json | 12 +- .../tsc/emitDefaultParametersFunctionES6.json | 12 +- ...itDefaultParametersFunctionExpression.json | 24 +-- ...efaultParametersFunctionExpressionES6.json | 24 +-- ...emitDefaultParametersFunctionProperty.json | 12 +- ...tDefaultParametersFunctionPropertyES6.json | 12 +- .../tsc/emitDefaultParametersMethod.json | 21 +-- .../tsc/emitDefaultParametersMethodES6.json | 21 +-- .../emptyArrayBindingPatternParameter04.json | 3 +- .../emptyObjectBindingPatternParameter04.json | 3 +- ...iableDeclarationBindingPatterns01_ES5.json | 24 +-- ...larationBindingPatterns01_ES5iterable.json | 24 +-- ...iableDeclarationBindingPatterns01_ES6.json | 24 +-- .../tsc/es6modulekindWithES5Target10.json | 1 - .../tsc/es6modulekindWithES5Target6.json | 6 +- .../tsc/esnextmodulekindWithES5Target10.json | 1 - .../tsc/esnextmodulekindWithES5Target6.json | 6 +- .../tests/tsc/exportAssignDottedName.json | 1 - .../tsc/exportAssignImportedIdentifier.json | 2 - .../tests/tsc/exportAssignTypes.json | 7 - .../tsc/exportAssignmentCircularModules.json | 3 - ...xportAssignmentConstrainedGenericType.json | 1 - .../tsc/exportAssignmentGenericType.json | 1 - .../tsc/exportAssignmentMergedInterface.json | 1 - .../tsc/exportAssignmentMergedModule.json | 1 - .../tsc/exportAssignmentTopLevelClodule.json | 1 - .../tsc/exportAssignmentTopLevelEnumdule.json | 1 - .../tsc/exportAssignmentTopLevelFundule.json | 1 - .../exportAssignmentTopLevelIdentifier.json | 1 - .../tests/tsc/exportDeclaredModule.json | 1 - .../tests/tsc/exportImportAlias.json | 3 - .../tests/tsc/exportsAndImports1-amd.json | 1 - .../tests/tsc/exportsAndImports1-es6.json | 1 - .../tests/tsc/exportsAndImports1.json | 1 - .../tests/tsc/exportsAndImports3-amd.json | 1 - .../tests/tsc/exportsAndImports3-es6.json | 1 - .../tests/tsc/exportsAndImports3.json | 1 - .../tests/tsc/exportsAndImports4-amd.json | 2 - .../tests/tsc/exportsAndImports4-es6.json | 2 - .../tests/tsc/exportsAndImports4.json | 2 - .../tsc/extendClassExpressionFromModule.json | 1 - .../swc_ecma_parser/tests/tsc/for-of40.json | 6 +- .../swc_ecma_parser/tests/tsc/for-of43.json | 6 +- .../swc_ecma_parser/tests/tsc/for-of45.json | 6 +- .../swc_ecma_parser/tests/tsc/for-of46.json | 6 +- .../swc_ecma_parser/tests/tsc/for-of47.json | 3 +- .../functionExpressionContextualTyping1.json | 6 +- .../tsc/functionImplementationErrors.json | 6 +- .../tests/tsc/functionImplementations.json | 9 +- .../tests/tsc/functionOverloadErrors.json | 6 +- ...ionParameterObjectRestAndInitializers.json | 9 +- .../tests/tsc/generatedContextualTyping.json | 144 ++++++------------ .../tsc/generatorReturnTypeInference.json | 6 +- ...generatorReturnTypeInferenceNonStrict.json | 6 +- ...CallWithObjectTypeArgsAndInitializers.json | 21 +-- .../tests/tsc/importAliasIdentifiers.json | 3 - .../tests/tsc/importEquals2.json | 1 - .../tests/tsc/importEqualsDeclaration.json | 2 - .../tests/tsc/importImportOnlyModule.json | 2 - .../tests/tsc/importNonExternalModule.json | 1 - .../tests/tsc/importStatements.json | 4 - .../tests/tsc/importStatementsInterfaces.json | 5 - .../tests/tsc/importTsBeforeDTs.json | 1 - .../tests/tsc/importsImplicitlyReadonly.json | 1 - .../tsc/importsNotUsedAsValues_error.json | 3 - .../tsc/invalidImportAliasIdentifiers.json | 4 - .../tests/tsc/iterableArrayPattern11.json | 3 +- .../tests/tsc/iterableArrayPattern12.json | 3 +- .../tests/tsc/iterableArrayPattern20.json | 6 +- .../tests/tsc/iterableArrayPattern9.json | 3 +- .../jsDeclarationsClassLeadingOptional.json | 3 +- .../tsc/jsDeclarationsComputedNames.json | 9 +- ...onsFunctionClassesCjsExportAssignment.json | 3 +- .../tsc/leaveOptionalParameterAsWritten.json | 1 - .../tests/tsc/literalTypes2.json | 24 +-- .../tsc/literalTypesAndDestructuring.json | 9 +- .../literalTypesWidenInParameterPosition.json | 3 +- .../tests/tsc/missingAndExcessProperties.json | 12 +- .../tests/tsc/moduleExportAlias.json | 1 - .../moduleResolutionWithoutExtension2.json | 1 - .../moduleResolutionWithoutExtension7.json | 1 - .../tests/tsc/moduleScoping.json | 1 - .../tests/tsc/nameDelimitedBySlashes.json | 1 - .../tests/tsc/nameWithFileExtension.json | 1 - .../tests/tsc/nameWithRelativePaths.json | 3 - .../tests/tsc/nullishCoalescingOperator6.json | 3 +- ...ngOperatorInParameterBindingPattern.2.json | 6 +- ...cingOperatorInParameterBindingPattern.json | 3 +- ...scingOperatorInParameterInitializer.2.json | 9 +- ...lescingOperatorInParameterInitializer.json | 3 +- .../tests/tsc/objectRestParameter.json | 6 +- .../tests/tsc/objectRestParameterES5.json | 6 +- .../tests/tsc/optionalBindingParameters4.json | 3 +- ...alChainingInParameterBindingPattern.2.json | 6 +- ...onalChainingInParameterBindingPattern.json | 3 +- ...ionalChainingInParameterInitializer.2.json | 9 +- ...ptionalChainingInParameterInitializer.json | 3 +- .../tests/tsc/optionalMethods.json | 3 +- ...ameterInitializersBackwardReferencing.json | 9 +- ...meterInitializersForwardReferencing.2.json | 9 +- ...rameterInitializersForwardReferencing.json | 66 +++----- ...ameterInitializersForwardReferencing1.json | 33 ++-- ...erInitializersForwardReferencing1_es6.json | 33 ++-- .../tsc/parserCastVersusArrowFunction1.json | 6 +- .../tests/tsc/parserImportDeclaration1.json | 1 - .../tests/tsc/parserParameterList14.json | 3 +- .../tests/tsc/parserParameterList15.json | 3 +- .../tests/tsc/parserParameterList16.json | 3 +- .../tests/tsc/parserParameterList17.json | 3 +- .../tests/tsc/parserRealSource12.json | 3 +- .../tests/tsc/parserRealSource14.json | 3 +- .../tests/tsc/preserveValueImports.json | 2 - .../privateNameFieldDestructuredBinding.json | 12 +- ...ateNameStaticFieldDestructuredBinding.json | 12 +- .../tests/tsc/recursiveTypeReferences1.json | 3 +- .../tests/tsc/reexportClassDefinition.json | 2 - .../tests/tsc/relativePathMustResolve.json | 1 - .../tsc/relativePathToDeclarationFile.json | 3 - .../restElementWithAssignmentPattern1.json | 3 +- .../restElementWithAssignmentPattern2.json | 3 +- .../restElementWithAssignmentPattern3.json | 3 +- .../restElementWithAssignmentPattern4.json | 3 +- .../tsc/restElementWithNullInitializer.json | 12 +- .../tests/tsc/scannerImportDeclaration1.json | 1 - .../tests/tsc/shadowedInternalModule.json | 6 - .../tsc/thisAndSuperInStaticMembers1.json | 6 +- .../tsc/thisAndSuperInStaticMembers2.json | 6 +- .../tests/tsc/topLevelAmbientModule.json | 1 - .../tests/tsc/topLevelFileModule.json | 2 - .../tests/tsc/topLevelFileModuleMissing.json | 1 - .../tsc/topLevelModuleDeclarationAndFile.json | 1 - .../tests/tsc/tupleElementTypes4.json | 3 +- ...ArgumentInferenceWithClassExpression1.json | 3 +- ...ArgumentInferenceWithClassExpression2.json | 3 +- ...ArgumentInferenceWithClassExpression3.json | 3 +- .../tests/tsc/typeFromJSInitializer.json | 9 +- .../tests/tsc/typeFromJSInitializer4.json | 9 +- .../tests/tsc/typeOfThisGeneral.json | 21 +-- .../tsc/typeOfThisInConstructorParamList.json | 3 +- .../tests/tsc/typeofANonExportedType.json | 1 - .../tests/tsc/typeofAnExportedType.json | 1 - ...pesOnlyExternalModuleStillHasInstance.json | 1 - .../tests/tsc/uniqueSymbols.json | 9 +- .../tests/tsc/uniqueSymbolsDeclarations.json | 9 +- ...batimModuleSyntaxInternalImportEquals.json | 3 - .../tsc/verbatimModuleSyntaxNoElisionCJS.json | 4 - .../verbatimModuleSyntaxRestrictionsESM.json | 2 - crates/swc_ecma_parser/tests/tsc/witness.json | 3 +- .../arrow-function/async-param/input.ts.json | 3 +- .../default-parameter-values/input.ts.json | 3 +- .../arrow/input.ts.json | 3 +- .../function/input.ts.json | 3 +- .../import/equals-require/input.ts.json | 1 - .../import/equals-type-only/input.ts.json | 1 - .../typescript/import/equals/input.ts.json | 1 - .../export-import-require/input.ts.json | 1 - .../export-import-type-require/input.ts.json | 1 - .../import/export-import/input.ts.json | 1 - .../tests/typescript/issue-1449/input.ts.json | 3 +- .../tests/typescript/issue-3236/input.ts.json | 3 +- .../next/stack-overflow/1/input.ts.json | 81 ++++------ crates/swc_ecma_quote_macros/src/ast/pat.rs | 2 +- .../src/rename/ops.rs | 1 - .../src/resolver/mod.rs | 1 - .../src/bugfixes/edge_default_param.rs | 1 - .../src/es2015/block_scoping/operator.rs | 1 - .../src/es2018/object_rest_spread.rs | 8 +- .../src/common_js.rs | 1 - .../src/module_decl_strip.rs | 2 +- .../src/decorators/legacy/metadata.rs | 5 +- .../src/import_export_assign.rs | 1 - .../src/strip.rs | 11 -- crates/swc_ecma_utils/src/lib.rs | 1 - crates/swc_ecma_visit/src/lib.rs | 2 - crates/swc_estree_compat/src/babelify/pat.rs | 4 +- crates/swc_estree_compat/src/swcify/pat.rs | 1 - 264 files changed, 611 insertions(+), 1406 deletions(-) diff --git a/crates/swc_bundler/src/bundler/keywords.rs b/crates/swc_bundler/src/bundler/keywords.rs index f0cfb1dfebb3..4a0997fd2b36 100644 --- a/crates/swc_bundler/src/bundler/keywords.rs +++ b/crates/swc_bundler/src/bundler/keywords.rs @@ -91,7 +91,6 @@ impl VisitMut for KeywordRenamer { span: pat.span, left: Box::new(Pat::Ident(renamed.into())), right: default.take(), - type_ann: None, })), }); } diff --git a/crates/swc_ecma_ast/src/pat.rs b/crates/swc_ecma_ast/src/pat.rs index a8647b02ef7a..8bf047a971a4 100644 --- a/crates/swc_ecma_ast/src/pat.rs +++ b/crates/swc_ecma_ast/src/pat.rs @@ -119,9 +119,6 @@ pub struct AssignPat { pub left: Box, pub right: Box, - - #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] - pub type_ann: Option>, } /// EsTree `RestElement` diff --git a/crates/swc_ecma_ast/src/typescript.rs b/crates/swc_ecma_ast/src/typescript.rs index 22a74e83cc1a..754774de2836 100644 --- a/crates/swc_ecma_ast/src/typescript.rs +++ b/crates/swc_ecma_ast/src/typescript.rs @@ -985,7 +985,6 @@ pub enum TsModuleName { #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct TsImportEqualsDecl { pub span: Span, - pub declare: bool, pub is_export: bool, pub is_type_only: bool, pub id: Ident, diff --git a/crates/swc_ecma_lints/src/rules/duplicate_exports.rs b/crates/swc_ecma_lints/src/rules/duplicate_exports.rs index 0833864b33ad..2f74c9aa5497 100644 --- a/crates/swc_ecma_lints/src/rules/duplicate_exports.rs +++ b/crates/swc_ecma_lints/src/rules/duplicate_exports.rs @@ -136,7 +136,7 @@ impl Visit for DuplicateExports { } fn visit_ts_import_equals_decl(&mut self, n: &TsImportEqualsDecl) { - if n.is_export && !n.is_type_only && !n.declare { + if n.is_export && !n.is_type_only { self.add(&n.id) } } diff --git a/crates/swc_ecma_parser/src/parser/expr.rs b/crates/swc_ecma_parser/src/parser/expr.rs index 424ca85a95e9..f6d6d4dfac48 100644 --- a/crates/swc_ecma_parser/src/parser/expr.rs +++ b/crates/swc_ecma_parser/src/parser/expr.rs @@ -1860,11 +1860,6 @@ impl Parser { ref mut span, .. }) - | Pat::Assign(AssignPat { - ref mut type_ann, - ref mut span, - .. - }) | Pat::Object(ObjectPat { ref mut type_ann, ref mut span, @@ -1883,7 +1878,7 @@ impl Parser { *type_ann = new_type_ann; } Pat::Expr(ref expr) => unreachable!("invalid pattern: Expr({:?})", expr), - Pat::Invalid(..) => { + Pat::Assign(..) | Pat::Invalid(..) => { // We don't have to panic here. // See: https://github.com/swc-project/swc/issues/1170 // @@ -1899,7 +1894,6 @@ impl Parser { span: span!(self, pat_start), left: Box::new(pat), right, - type_ann: None, }); } diff --git a/crates/swc_ecma_parser/src/parser/pat.rs b/crates/swc_ecma_parser/src/parser/pat.rs index 292cf1b78939..e28ed8cb446f 100644 --- a/crates/swc_ecma_parser/src/parser/pat.rs +++ b/crates/swc_ecma_parser/src/parser/pat.rs @@ -81,7 +81,6 @@ impl Parser { span: span!(self, start), left: Box::new(left), right, - type_ann: None, })); } @@ -262,7 +261,6 @@ impl Parser { Pat::Assign(AssignPat { span: span!(self, start), left: Box::new(pat), - type_ann: None, right, }) } else { @@ -416,7 +414,6 @@ impl Parser { span: span!(self, pat_start), left: Box::new(pat), right, - type_ann: None, } .into(); } @@ -607,7 +604,6 @@ impl Parser { PatOrExpr::Pat(left) => left, }, right, - type_ann: None, })) } Expr::Object(ObjectLit { @@ -1051,7 +1047,6 @@ mod tests { elems: vec![ None, Some(Pat::Assign(AssignPat { - type_ann: None, span, left: Box::new(Pat::Ident(ident("a").into())), right: Box::new(Expr::Lit(Lit::Num(Number { diff --git a/crates/swc_ecma_parser/src/parser/stmt.rs b/crates/swc_ecma_parser/src/parser/stmt.rs index 0ca8b51b9f7c..70f6105d0998 100644 --- a/crates/swc_ecma_parser/src/parser/stmt.rs +++ b/crates/swc_ecma_parser/src/parser/stmt.rs @@ -744,13 +744,13 @@ impl<'a, I: Tokens> Parser { Pat::Ident(BindingIdent { type_ann, .. }) | Pat::Array(ArrayPat { type_ann, .. }) | Pat::Rest(RestPat { type_ann, .. }) - | Pat::Object(ObjectPat { type_ann, .. }) - | Pat::Assign(AssignPat { type_ann, .. }) => { + | Pat::Object(ObjectPat { type_ann, .. }) => { *type_ann = Some(Box::new(TsTypeAnn { span: span!(self, type_ann_start), type_ann: ty, })); } + Pat::Assign(..) => {} Pat::Invalid(_) => {} Pat::Expr(_) => {} } @@ -953,9 +953,6 @@ impl<'a, I: Tokens> Parser { Pat::Array(ArrayPat { ref mut type_ann, .. }) - | Pat::Assign(AssignPat { - ref mut type_ann, .. - }) | Pat::Ident(BindingIdent { ref mut type_ann, .. }) @@ -1230,7 +1227,6 @@ impl<'a, I: Tokens> Parser { let type_ann = match decl.decls[0].name { Pat::Ident(ref v) => Some(&v.type_ann), Pat::Array(ref v) => Some(&v.type_ann), - Pat::Assign(ref v) => Some(&v.type_ann), Pat::Rest(ref v) => Some(&v.type_ann), Pat::Object(ref v) => Some(&v.type_ann), _ => None, diff --git a/crates/swc_ecma_parser/src/parser/typescript.rs b/crates/swc_ecma_parser/src/parser/typescript.rs index ca6ad2dbcf71..beb72c833a3f 100644 --- a/crates/swc_ecma_parser/src/parser/typescript.rs +++ b/crates/swc_ecma_parser/src/parser/typescript.rs @@ -1158,7 +1158,6 @@ impl Parser { expect!(self, ';'); Ok(Box::new(TsImportEqualsDecl { span: span!(self, start), - declare: false, id, is_export, is_type_only, diff --git a/crates/swc_ecma_parser/tests/tsc/ES5For-of26.json b/crates/swc_ecma_parser/tests/tsc/ES5For-of26.json index d9edff014299..b1527e26e227 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5For-of26.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5For-of26.json @@ -66,8 +66,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -96,8 +95,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/ES5For-of27.json b/crates/swc_ecma_parser/tests/tsc/ES5For-of27.json index a25e702e8654..b4a7eefa7336 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5For-of27.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5For-of27.json @@ -78,8 +78,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } }, { @@ -121,8 +120,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/ES5For-of28.json b/crates/swc_ecma_parser/tests/tsc/ES5For-of28.json index c09dcab3a0ee..17d9dd70a55e 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5For-of28.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5For-of28.json @@ -66,8 +66,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -96,8 +95,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/ES5For-of29.json b/crates/swc_ecma_parser/tests/tsc/ES5For-of29.json index 8b7d1d687c12..38562dc66d61 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5For-of29.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5For-of29.json @@ -78,8 +78,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } }, { @@ -121,8 +120,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/ES5For-of30.json b/crates/swc_ecma_parser/tests/tsc/ES5For-of30.json index c3eceea5162a..584781d1a671 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5For-of30.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5For-of30.json @@ -256,8 +256,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -286,8 +285,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/ES5For-of31.json b/crates/swc_ecma_parser/tests/tsc/ES5For-of31.json index 73e14c986526..5c550c969372 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5For-of31.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5For-of31.json @@ -147,8 +147,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -190,8 +189,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/ES5For-of35.json b/crates/swc_ecma_parser/tests/tsc/ES5For-of35.json index 7e6168b038cc..a535a027822a 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5For-of35.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5For-of35.json @@ -78,8 +78,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } }, { @@ -121,8 +120,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/ES5For-of36.json b/crates/swc_ecma_parser/tests/tsc/ES5For-of36.json index 83242f9ff485..bf12b16accae 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5For-of36.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5For-of36.json @@ -66,8 +66,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -96,8 +95,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/FunctionDeclaration3_es6.json b/crates/swc_ecma_parser/tests/tsc/FunctionDeclaration3_es6.json index 890fc90e93cb..17766d0d8676 100644 --- a/crates/swc_ecma_parser/tests/tsc/FunctionDeclaration3_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/FunctionDeclaration3_es6.json @@ -55,8 +55,7 @@ }, "value": "yield", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json index a9ce6a718dd4..2abfc15f2501 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json @@ -503,7 +503,6 @@ "end": 311, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { @@ -534,7 +533,6 @@ "end": 333, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsExternal.json b/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsExternal.json index 377aaa991f39..2cefaa5db140 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsExternal.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsExternal.json @@ -173,7 +173,6 @@ "end": 364, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -212,7 +211,6 @@ "end": 519, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/ambientExternalModuleMerging.json b/crates/swc_ecma_parser/tests/tsc/ambientExternalModuleMerging.json index e5f64c2941ba..5721b8933446 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientExternalModuleMerging.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientExternalModuleMerging.json @@ -13,7 +13,6 @@ "end": 89, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/ambientShorthand.json b/crates/swc_ecma_parser/tests/tsc/ambientShorthand.json index cf008a3b6007..55050b576873 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientShorthand.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientShorthand.json @@ -155,7 +155,6 @@ "end": 259, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/amdImportAsPrimaryExpression.json b/crates/swc_ecma_parser/tests/tsc/amdImportAsPrimaryExpression.json index 8e0fd30fb6aa..1f350336b913 100644 --- a/crates/swc_ecma_parser/tests/tsc/amdImportAsPrimaryExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/amdImportAsPrimaryExpression.json @@ -100,7 +100,6 @@ "end": 122, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/amdImportNotAsPrimaryExpression.json b/crates/swc_ecma_parser/tests/tsc/amdImportNotAsPrimaryExpression.json index 8fa303344180..ce2d849b48df 100644 --- a/crates/swc_ecma_parser/tests/tsc/amdImportNotAsPrimaryExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/amdImportNotAsPrimaryExpression.json @@ -449,7 +449,6 @@ "end": 289, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -488,7 +487,6 @@ "end": 372, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json index 058741854646..d5a8e6dafe8f 100644 --- a/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json @@ -279,8 +279,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/arrowFunctionExpressions.json b/crates/swc_ecma_parser/tests/tsc/arrowFunctionExpressions.json index f5250f938404..48750f2c9f50 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrowFunctionExpressions.json +++ b/crates/swc_ecma_parser/tests/tsc/arrowFunctionExpressions.json @@ -1127,8 +1127,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1580,8 +1579,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json b/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json index cbe86aa37ac4..42d10881492c 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json @@ -288,8 +288,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -740,8 +739,7 @@ }, "pattern": "a", "flags": "" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es2017.json b/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es2017.json index 6b6fc0a5a3b2..809a7be50522 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es2017.json @@ -55,8 +55,7 @@ }, "value": "await", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es5.json b/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es5.json index 550515147def..0c85e1392b94 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es5.json @@ -55,8 +55,7 @@ }, "value": "await", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es6.json index 902ccb5e063f..69f95fa48be5 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncArrowFunction3_es6.json @@ -55,8 +55,7 @@ }, "value": "await", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es2017.json b/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es2017.json index 6b6fc0a5a3b2..809a7be50522 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es2017.json @@ -55,8 +55,7 @@ }, "value": "await", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es5.json b/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es5.json index 550515147def..0c85e1392b94 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es5.json @@ -55,8 +55,7 @@ }, "value": "await", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es6.json index 902ccb5e063f..69f95fa48be5 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncFunctionDeclaration3_es6.json @@ -55,8 +55,7 @@ }, "value": "await", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/asyncWithVarShadowing_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncWithVarShadowing_es6.json index 1241e059efd1..d32f229b8f94 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncWithVarShadowing_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncWithVarShadowing_es6.json @@ -1222,8 +1222,7 @@ }, "value": "y", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1586,8 +1585,7 @@ }, "value": "y", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2084,8 +2082,7 @@ }, "value": "y", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/bundlerSyntaxRestrictions.json b/crates/swc_ecma_parser/tests/tsc/bundlerSyntaxRestrictions.json index 583bcd68cd42..988e16c73542 100644 --- a/crates/swc_ecma_parser/tests/tsc/bundlerSyntaxRestrictions.json +++ b/crates/swc_ecma_parser/tests/tsc/bundlerSyntaxRestrictions.json @@ -310,7 +310,6 @@ "end": 382, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -641,7 +640,6 @@ "end": 667, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/checkExportsObjectAssignProperty.json b/crates/swc_ecma_parser/tests/tsc/checkExportsObjectAssignProperty.json index 467cac2de7dc..5dfe3b5a23d7 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkExportsObjectAssignProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/checkExportsObjectAssignProperty.json @@ -1912,7 +1912,6 @@ "end": 1340, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -2571,7 +2570,6 @@ "end": 1688, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/checkExportsObjectAssignPrototypeProperty.json b/crates/swc_ecma_parser/tests/tsc/checkExportsObjectAssignPrototypeProperty.json index f129b092fa15..f975321a465e 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkExportsObjectAssignPrototypeProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/checkExportsObjectAssignPrototypeProperty.json @@ -1239,7 +1239,6 @@ "end": 903, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTagOnObjectProperty2.json b/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTagOnObjectProperty2.json index b857adfc96f1..af2894ab38b7 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTagOnObjectProperty2.json +++ b/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTagOnObjectProperty2.json @@ -266,8 +266,7 @@ }, "value": "0", "raw": "\"0\"" - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/checkObjectDefineProperty.json b/crates/swc_ecma_parser/tests/tsc/checkObjectDefineProperty.json index eb0a7ccafade..bddb36576960 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkObjectDefineProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/checkObjectDefineProperty.json @@ -1338,8 +1338,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } ], "body": { @@ -1589,8 +1588,7 @@ }, "value": "expected", "optional": false - }, - "typeAnnotation": null + } } ], "body": { @@ -1684,7 +1682,6 @@ "end": 1376, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/circularImportAlias.json b/crates/swc_ecma_parser/tests/tsc/circularImportAlias.json index 89c1dc8ad62f..36b1ef21df87 100644 --- a/crates/swc_ecma_parser/tests/tsc/circularImportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/circularImportAlias.json @@ -40,7 +40,6 @@ "end": 58, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { @@ -288,7 +287,6 @@ "end": 192, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/circularReference.json b/crates/swc_ecma_parser/tests/tsc/circularReference.json index 9982f1f09392..94d309549a59 100644 --- a/crates/swc_ecma_parser/tests/tsc/circularReference.json +++ b/crates/swc_ecma_parser/tests/tsc/circularReference.json @@ -13,7 +13,6 @@ "end": 55, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -523,7 +522,6 @@ "end": 290, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/cjsImportInES2015.json b/crates/swc_ecma_parser/tests/tsc/cjsImportInES2015.json index 001ad9688ade..4e671edab883 100644 --- a/crates/swc_ecma_parser/tests/tsc/cjsImportInES2015.json +++ b/crates/swc_ecma_parser/tests/tsc/cjsImportInES2015.json @@ -66,7 +66,6 @@ "end": 249, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": true, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/classAbstractImportInstantiation.json b/crates/swc_ecma_parser/tests/tsc/classAbstractImportInstantiation.json index 3d4d942e73c6..8b5043776732 100644 --- a/crates/swc_ecma_parser/tests/tsc/classAbstractImportInstantiation.json +++ b/crates/swc_ecma_parser/tests/tsc/classAbstractImportInstantiation.json @@ -105,7 +105,6 @@ "end": 79, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.2.json b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.2.json index d0a0b3b50063..1a1c44a6beac 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.2.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.2.json @@ -188,8 +188,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], @@ -448,8 +447,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], @@ -483,8 +481,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.3.json b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.3.json index 99d89ebd3160..8cc9ae654efe 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.3.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.3.json @@ -188,8 +188,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], @@ -448,8 +447,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], @@ -483,8 +481,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.json b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.json index cd3bb7b46003..19ca842f9eca 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterBindingPattern.json @@ -153,8 +153,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.2.json b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.2.json index 411518bec575..58d8fd52956b 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.2.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.2.json @@ -142,8 +142,7 @@ "typeParams": null, "superTypeParams": null, "implements": [] - }, - "typeAnnotation": null + } } ], "body": { @@ -351,8 +350,7 @@ "typeParams": null, "superTypeParams": null, "implements": [] - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -381,8 +379,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.3.json b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.3.json index c9694780bda8..06ebff71d8eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.3.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.3.json @@ -142,8 +142,7 @@ "typeParams": null, "superTypeParams": null, "implements": [] - }, - "typeAnnotation": null + } } ], "body": { @@ -351,8 +350,7 @@ "typeParams": null, "superTypeParams": null, "implements": [] - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -381,8 +379,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.json b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.json index d4885905b7b0..3006061457cd 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithStaticFieldInParameterInitializer.json @@ -107,8 +107,7 @@ "typeParams": null, "superTypeParams": null, "implements": [] - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/commonJSImportAsPrimaryExpression.json b/crates/swc_ecma_parser/tests/tsc/commonJSImportAsPrimaryExpression.json index e248ce3d054e..d1ba3e0aabfb 100644 --- a/crates/swc_ecma_parser/tests/tsc/commonJSImportAsPrimaryExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/commonJSImportAsPrimaryExpression.json @@ -123,7 +123,6 @@ "end": 150, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/commonJSImportNotAsPrimaryExpression.json b/crates/swc_ecma_parser/tests/tsc/commonJSImportNotAsPrimaryExpression.json index dcea5c0f6c5f..93d1b33ed0f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/commonJSImportNotAsPrimaryExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/commonJSImportNotAsPrimaryExpression.json @@ -449,7 +449,6 @@ "end": 294, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -488,7 +487,6 @@ "end": 377, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json b/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json index a2c82ac20230..8c16e3e82490 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json @@ -77,8 +77,7 @@ "end": 35, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -172,8 +171,7 @@ "end": 81, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -302,8 +300,7 @@ "end": 134, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json index 70aab6f12744..f70edeb362c9 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json @@ -122,8 +122,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], @@ -329,8 +328,7 @@ "end": 143, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -568,8 +566,7 @@ "end": 248, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json index e3bc98937702..e535f06585cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json @@ -141,8 +141,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], @@ -422,8 +421,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -490,8 +488,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -764,8 +761,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithDefaultValues.json b/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithDefaultValues.json index 1bc29dc22c93..d20406f79ca5 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithDefaultValues.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithDefaultValues.json @@ -124,8 +124,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], @@ -288,8 +287,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json index 7a518a1945d2..da867c885738 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json @@ -409,8 +409,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -595,8 +594,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -1571,8 +1569,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json index 4509d63f0cb3..86bb54cc02d3 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json @@ -218,8 +218,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -368,8 +367,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -526,8 +524,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -781,8 +778,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1043,8 +1039,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedIife.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedIife.json index 39f98af82840..167261ff1d3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedIife.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedIife.json @@ -536,8 +536,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } ], "body": { @@ -649,8 +648,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } ], "body": { @@ -2125,8 +2123,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "body": { @@ -2294,8 +2291,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedIifeStrict.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedIifeStrict.json index 5d0bd00373d3..6995784d5322 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedIifeStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedIifeStrict.json @@ -536,8 +536,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } ], "body": { @@ -649,8 +648,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } ], "body": { @@ -2125,8 +2123,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "body": { @@ -2294,8 +2291,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowAssignmentPatternOrder.json b/crates/swc_ecma_parser/tests/tsc/controlFlowAssignmentPatternOrder.json index bff2b63aa861..dfaf892f09c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowAssignmentPatternOrder.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowAssignmentPatternOrder.json @@ -400,8 +400,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -831,8 +830,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1288,8 +1286,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1813,8 +1810,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2336,8 +2332,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2797,8 +2792,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -3284,8 +3278,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -3839,8 +3832,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -4404,8 +4396,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -4865,8 +4856,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -5352,8 +5342,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -5907,8 +5896,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowBindingElement.json b/crates/swc_ecma_parser/tests/tsc/controlFlowBindingElement.json index 7a0b5748c914..e92845b21156 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowBindingElement.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowBindingElement.json @@ -2922,8 +2922,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowBindingPatternOrder.json b/crates/swc_ecma_parser/tests/tsc/controlFlowBindingPatternOrder.json index 835047a41b1f..ec2efc756b75 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowBindingPatternOrder.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowBindingPatternOrder.json @@ -256,8 +256,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -587,8 +586,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -949,8 +947,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1316,8 +1313,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1723,8 +1719,7 @@ } ] } - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowDestructuringDeclaration.json b/crates/swc_ecma_parser/tests/tsc/controlFlowDestructuringDeclaration.json index 4b7fb031406a..1a691604aaaa 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowDestructuringDeclaration.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowDestructuringDeclaration.json @@ -589,8 +589,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1054,8 +1053,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowParameter.json b/crates/swc_ecma_parser/tests/tsc/controlFlowParameter.json index 96773ae84265..ce58dbb30ae3 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowParameter.json @@ -144,8 +144,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } } ], @@ -428,8 +427,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } } ], @@ -565,8 +563,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -689,8 +686,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } } ], @@ -826,8 +822,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -942,8 +937,7 @@ }, "kind": "any" } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/declarationsAndAssignments.json b/crates/swc_ecma_parser/tests/tsc/declarationsAndAssignments.json index 4271f84acc70..12367e89165f 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationsAndAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationsAndAssignments.json @@ -2989,8 +2989,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -3019,8 +3018,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -3251,8 +3249,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -3281,8 +3278,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -5018,8 +5014,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "optional": false, @@ -5685,8 +5680,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } }, { "type": "ArrayPattern", @@ -5723,8 +5717,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } }, { "type": "ObjectPattern", @@ -5791,8 +5784,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } } ], @@ -7834,8 +7826,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -7864,8 +7855,7 @@ }, "value": "abc", "raw": "\"abc\"" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -8376,8 +8366,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES5.json index 4a67a898ef36..686f3ce7c659 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES5.json @@ -138,8 +138,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -168,8 +167,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES5iterable.json index 7509f512d5fa..c8b6eb6fd907 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES5iterable.json @@ -138,8 +138,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -168,8 +167,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES6.json b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES6.json index b9dca624f223..b16fea463028 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment1ES6.json @@ -138,8 +138,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -168,8 +167,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json index 02cf078f813b..b21cde86aa88 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json @@ -755,8 +755,7 @@ }, "value": "string", "raw": "\"string\"" - }, - "typeAnnotation": null + } }, { "type": "Identifier", diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment3.json b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment3.json index 7df5b38bf6e2..b2d03b1c1b3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment3.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment3.json @@ -69,8 +69,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -166,8 +165,7 @@ }, "value": "c", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -196,8 +194,7 @@ }, "value": "e", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -293,8 +290,7 @@ }, "value": "f", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -323,8 +319,7 @@ }, "value": "i", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -353,8 +348,7 @@ }, "value": "f", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -466,8 +460,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -606,8 +599,7 @@ }, "value": "c", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -636,8 +628,7 @@ }, "value": "e", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -776,8 +767,7 @@ }, "value": "f", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -806,8 +796,7 @@ }, "value": "i", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -836,8 +825,7 @@ }, "value": "f", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringEvaluationOrder.json b/crates/swc_ecma_parser/tests/tsc/destructuringEvaluationOrder.json index ac59e014688d..db0f41d2f19b 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringEvaluationOrder.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringEvaluationOrder.json @@ -345,8 +345,7 @@ } ], "typeArguments": null - }, - "typeAnnotation": null + } } ], "optional": false, @@ -498,8 +497,7 @@ } ], "typeArguments": null - }, - "typeAnnotation": null + } } ], "optional": false, @@ -708,8 +706,7 @@ } ], "typeArguments": null - }, - "typeAnnotation": null + } } }, { @@ -860,8 +857,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringObjectAssignmentPatternWithNestedSpread.json b/crates/swc_ecma_parser/tests/tsc/destructuringObjectAssignmentPatternWithNestedSpread.json index 67943d27c00e..6c7568c35790 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringObjectAssignmentPatternWithNestedSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringObjectAssignmentPatternWithNestedSpread.json @@ -358,8 +358,7 @@ }, "value": "d", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment1ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment1ES5.json index f0ffadf50b83..16ce82f8e23a 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment1ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment1ES5.json @@ -353,8 +353,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment1ES6.json b/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment1ES6.json index bd05e161e138..aa0a4da6b05c 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment1ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment1ES6.json @@ -353,8 +353,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json index 4d7b53b2d10a..da11561cf81e 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json @@ -1375,8 +1375,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1455,8 +1454,7 @@ "end": 960, "ctxt": 0 } - }, - "typeAnnotation": null + } } }, { @@ -1540,8 +1538,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1795,8 +1792,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2147,8 +2143,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2393,8 +2388,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3189,8 +3183,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3467,8 +3460,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3700,8 +3692,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -4610,8 +4601,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } } ], @@ -5678,8 +5668,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json index a2d1442aa5d7..c47ed2a1da33 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json @@ -1375,8 +1375,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1455,8 +1454,7 @@ "end": 989, "ctxt": 0 } - }, - "typeAnnotation": null + } } }, { @@ -1540,8 +1538,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1795,8 +1792,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2147,8 +2143,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2393,8 +2388,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3189,8 +3183,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3467,8 +3460,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3700,8 +3692,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -4610,8 +4601,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } } ], @@ -5678,8 +5668,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json index 1eba17f376ce..8b55cea1ab95 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json @@ -1375,8 +1375,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1455,8 +1454,7 @@ "end": 1010, "ctxt": 0 } - }, - "typeAnnotation": null + } } }, { @@ -1540,8 +1538,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1795,8 +1792,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2147,8 +2143,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2393,8 +2388,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2977,8 +2971,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3255,8 +3248,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3488,8 +3480,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -5337,8 +5328,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json index ddd09e1eec83..870874632379 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json @@ -613,8 +613,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1369,8 +1368,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5.json index 32c7f24af974..abfe5a27a627 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5.json @@ -612,8 +612,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -819,8 +818,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -848,8 +846,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -878,8 +875,7 @@ }, "value": "temp", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1034,8 +1030,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1063,8 +1058,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1093,8 +1087,7 @@ }, "value": "temp", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1797,8 +1790,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5iterable.json index 6513f02f961b..eaf015c5ecf5 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5iterable.json @@ -612,8 +612,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -819,8 +818,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -848,8 +846,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -878,8 +875,7 @@ }, "value": "temp", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1034,8 +1030,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1063,8 +1058,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1093,8 +1087,7 @@ }, "value": "temp", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1797,8 +1790,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES6.json b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES6.json index 0f17973adc1b..93db7d214582 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES6.json @@ -612,8 +612,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -819,8 +818,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -848,8 +846,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -878,8 +875,7 @@ }, "value": "temp", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1034,8 +1030,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1063,8 +1058,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1093,8 +1087,7 @@ }, "value": "temp", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1797,8 +1790,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration2.json b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration2.json index f7cd324703ca..14157bf3fde9 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration2.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration2.json @@ -642,8 +642,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -671,8 +670,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -701,8 +699,7 @@ }, "value": "temp", "optional": false - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringWithLiteralInitializers.json b/crates/swc_ecma_parser/tests/tsc/destructuringWithLiteralInitializers.json index 4351f9a15ac3..7f583613cebd 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringWithLiteralInitializers.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringWithLiteralInitializers.json @@ -949,8 +949,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1210,8 +1209,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1521,8 +1519,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -1986,8 +1983,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2593,8 +2589,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -2623,8 +2618,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2818,8 +2812,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3014,8 +3007,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -3043,8 +3035,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -3228,8 +3219,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -3258,8 +3248,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -3273,8 +3262,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringWithLiteralInitializers2.json b/crates/swc_ecma_parser/tests/tsc/destructuringWithLiteralInitializers2.json index 77d6f9a37cfe..a9d5466804cb 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringWithLiteralInitializers2.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringWithLiteralInitializers2.json @@ -155,8 +155,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], @@ -265,8 +264,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -388,8 +386,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -470,8 +467,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "Identifier", @@ -574,8 +570,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "Identifier", @@ -600,8 +595,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], @@ -689,8 +683,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "Identifier", @@ -729,8 +722,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -818,8 +810,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "Identifier", @@ -871,8 +862,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -953,8 +943,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -983,8 +972,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1076,8 +1064,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1106,8 +1093,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1121,8 +1107,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], @@ -1210,8 +1195,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1240,8 +1224,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1269,8 +1252,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1358,8 +1340,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1388,8 +1369,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1430,8 +1410,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -1648,8 +1627,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1678,8 +1656,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1771,8 +1748,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1801,8 +1777,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1816,8 +1791,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], @@ -1905,8 +1879,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1935,8 +1908,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1964,8 +1936,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2053,8 +2024,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -2083,8 +2053,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2125,8 +2094,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2207,8 +2175,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -2237,8 +2204,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2330,8 +2296,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -2360,8 +2325,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2375,8 +2339,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], @@ -2464,8 +2427,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -2494,8 +2456,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2523,8 +2484,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2612,8 +2572,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -2642,8 +2601,7 @@ }, "value": "bar", "raw": "'bar'" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -2684,8 +2642,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunction.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunction.json index 27a28d9b31ca..5bd78126c66b 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunction.json @@ -420,8 +420,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.json b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.json index e7ee6602ac49..180c12e061aa 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitArrowFunctionES6.json @@ -420,8 +420,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } ], "body": { @@ -1070,8 +1069,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1523,8 +1521,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.json index 2216b3d438c4..7625eefaff5e 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationOverloadInES6.json @@ -327,8 +327,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.json index 30dc10137446..ab4a3eadeabe 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithConstructorInES6.json @@ -519,8 +519,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.json index a19ea9860759..698658518972 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionInES6.json @@ -116,8 +116,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.json index 8763b34285b5..9c7f8625d28b 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunction.json @@ -91,8 +91,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } } ], @@ -201,8 +200,7 @@ }, "value": 5.0, "raw": "5" - }, - "typeAnnotation": null + } } }, { @@ -309,8 +307,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } } ], @@ -383,8 +380,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.json index 8076f51b4e6e..03b909d1a1f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionES6.json @@ -91,8 +91,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } } ], @@ -201,8 +200,7 @@ }, "value": 5.0, "raw": "5" - }, - "typeAnnotation": null + } } }, { @@ -309,8 +307,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } } ], @@ -383,8 +380,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.json index 7bbdfe647344..e3fadf784f0a 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpression.json @@ -69,8 +69,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } ], "body": { @@ -181,8 +180,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } ], "body": { @@ -293,8 +291,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } }, { "type": "RestElement", @@ -403,8 +400,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } }, { "type": "RestElement", @@ -517,8 +513,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } }, { @@ -661,8 +656,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } }, { @@ -699,8 +693,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -882,8 +875,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.json index 31cff111377c..6247e87c3310 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionExpressionES6.json @@ -69,8 +69,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } ], "body": { @@ -181,8 +180,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } ], "body": { @@ -293,8 +291,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } }, { "type": "RestElement", @@ -403,8 +400,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } }, { "type": "RestElement", @@ -517,8 +513,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } }, { @@ -661,8 +656,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } }, { @@ -699,8 +693,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -882,8 +875,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.json index 6d1973d8a846..5b4fecbc9523 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionProperty.json @@ -90,8 +90,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } }, { @@ -197,8 +196,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], @@ -342,8 +340,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], @@ -487,8 +484,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.json index 78a57ec263fd..962447c5bf24 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersFunctionPropertyES6.json @@ -90,8 +90,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } }, { @@ -197,8 +196,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], @@ -342,8 +340,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], @@ -487,8 +484,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.json index 56e33ac97bd5..8e676e0962b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethod.json @@ -187,8 +187,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], @@ -293,8 +292,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } } ], @@ -414,8 +412,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -533,8 +530,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } } ], @@ -618,8 +614,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -764,8 +759,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], @@ -861,8 +855,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.json b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.json index d85f1e4a20c2..0c1cccbdd3ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitDefaultParametersMethodES6.json @@ -187,8 +187,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], @@ -293,8 +292,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } } ], @@ -414,8 +412,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -533,8 +530,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } } ], @@ -618,8 +614,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -764,8 +759,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } } ], @@ -861,8 +855,7 @@ }, "value": "hello", "raw": "\"hello\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/emptyArrayBindingPatternParameter04.json b/crates/swc_ecma_parser/tests/tsc/emptyArrayBindingPatternParameter04.json index eaa8c0b9ab15..4762e7895564 100644 --- a/crates/swc_ecma_parser/tests/tsc/emptyArrayBindingPatternParameter04.json +++ b/crates/swc_ecma_parser/tests/tsc/emptyArrayBindingPatternParameter04.json @@ -107,8 +107,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/emptyObjectBindingPatternParameter04.json b/crates/swc_ecma_parser/tests/tsc/emptyObjectBindingPatternParameter04.json index 20f38e1b6df2..2676fe466608 100644 --- a/crates/swc_ecma_parser/tests/tsc/emptyObjectBindingPatternParameter04.json +++ b/crates/swc_ecma_parser/tests/tsc/emptyObjectBindingPatternParameter04.json @@ -123,8 +123,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES5.json b/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES5.json index b5d8e11dfa45..d36080181773 100644 --- a/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES5.json @@ -999,8 +999,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1038,8 +1037,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1104,8 +1102,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1121,8 +1118,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1182,8 +1178,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1212,8 +1207,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1269,8 +1263,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1286,8 +1279,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES5iterable.json index 6135d81ac80c..1f38264152fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES5iterable.json @@ -999,8 +999,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1038,8 +1037,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1104,8 +1102,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1121,8 +1118,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1182,8 +1178,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1212,8 +1207,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1269,8 +1263,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1286,8 +1279,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES6.json b/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES6.json index b5d8e11dfa45..d36080181773 100644 --- a/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emptyVariableDeclarationBindingPatterns01_ES6.json @@ -999,8 +999,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1038,8 +1037,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1104,8 +1102,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1121,8 +1118,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1182,8 +1178,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1212,8 +1207,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1269,8 +1263,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1286,8 +1279,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target10.json b/crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target10.json index 0e70eaf7f6ae..876ab6b12e90 100644 --- a/crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target10.json +++ b/crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target10.json @@ -13,7 +13,6 @@ "end": 63, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target6.json b/crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target6.json index 13ffe5a43d39..6886dcfc83ae 100644 --- a/crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target6.json +++ b/crates/swc_ecma_parser/tests/tsc/es6modulekindWithES5Target6.json @@ -62,8 +62,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } } ], @@ -220,8 +219,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target10.json b/crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target10.json index 0e70eaf7f6ae..876ab6b12e90 100644 --- a/crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target10.json +++ b/crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target10.json @@ -13,7 +13,6 @@ "end": 63, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target6.json b/crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target6.json index 13ffe5a43d39..6886dcfc83ae 100644 --- a/crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target6.json +++ b/crates/swc_ecma_parser/tests/tsc/esnextmodulekindWithES5Target6.json @@ -62,8 +62,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } } ], @@ -220,8 +219,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignDottedName.json b/crates/swc_ecma_parser/tests/tsc/exportAssignDottedName.json index 36fb7ee6aee0..fabda35943f4 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignDottedName.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignDottedName.json @@ -73,7 +73,6 @@ "end": 115, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignImportedIdentifier.json b/crates/swc_ecma_parser/tests/tsc/exportAssignImportedIdentifier.json index 5e71581f4e9f..963f20d97fd5 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignImportedIdentifier.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignImportedIdentifier.json @@ -73,7 +73,6 @@ "end": 115, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -190,7 +189,6 @@ "end": 199, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json b/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json index fa94dec7402a..e0a0ddaf22a5 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json @@ -585,7 +585,6 @@ "end": 478, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -682,7 +681,6 @@ "end": 546, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -779,7 +777,6 @@ "end": 616, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -876,7 +873,6 @@ "end": 684, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -1001,7 +997,6 @@ "end": 758, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -1108,7 +1103,6 @@ "end": 820, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -1189,7 +1183,6 @@ "end": 879, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentCircularModules.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentCircularModules.json index f3df3dec6181..bb677bf80161 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentCircularModules.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentCircularModules.json @@ -13,7 +13,6 @@ "end": 73, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -168,7 +167,6 @@ "end": 184, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -323,7 +321,6 @@ "end": 295, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json index 8449347f7710..110b223d42e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json @@ -313,7 +313,6 @@ "end": 194, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentGenericType.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentGenericType.json index 8f2ac1ffccc9..dc94b1ecd2e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentGenericType.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentGenericType.json @@ -145,7 +145,6 @@ "end": 141, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json index ef252ea31022..2a9c9b68acd5 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json @@ -409,7 +409,6 @@ "end": 241, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedModule.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedModule.json index 63dc1b1e23b4..330b2aee4c1a 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedModule.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedModule.json @@ -387,7 +387,6 @@ "end": 301, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelClodule.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelClodule.json index 6fdaee4e75d2..3f2d335824d3 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelClodule.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelClodule.json @@ -176,7 +176,6 @@ "end": 180, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelEnumdule.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelEnumdule.json index e09d881ea12c..fe74afce790e 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelEnumdule.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelEnumdule.json @@ -190,7 +190,6 @@ "end": 181, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelFundule.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelFundule.json index 9586d0b688e4..5b467acba312 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelFundule.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelFundule.json @@ -164,7 +164,6 @@ "end": 185, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelIdentifier.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelIdentifier.json index 4dff1eef085f..bf42ade3ae13 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelIdentifier.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentTopLevelIdentifier.json @@ -111,7 +111,6 @@ "end": 150, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportDeclaredModule.json b/crates/swc_ecma_parser/tests/tsc/exportDeclaredModule.json index 28b08c8b699f..c3e726e7c53d 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportDeclaredModule.json +++ b/crates/swc_ecma_parser/tests/tsc/exportDeclaredModule.json @@ -168,7 +168,6 @@ "end": 168, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json b/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json index f6693113c751..192c1f59d7a9 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json @@ -382,7 +382,6 @@ "end": 295, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { @@ -1213,7 +1212,6 @@ "end": 692, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { @@ -1931,7 +1929,6 @@ "end": 1044, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports1-amd.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports1-amd.json index 2e7602c633d1..114b44b42264 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports1-amd.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports1-amd.json @@ -471,7 +471,6 @@ "end": 269, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports1-es6.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports1-es6.json index 44427b21b763..58ff1a5a4be7 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports1-es6.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports1-es6.json @@ -471,7 +471,6 @@ "end": 274, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports1.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports1.json index 70a53120b61c..d3f90ace61a8 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports1.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports1.json @@ -471,7 +471,6 @@ "end": 258, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports3-amd.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports3-amd.json index 30a7541676a9..dd934d907fee 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports3-amd.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports3-amd.json @@ -543,7 +543,6 @@ "end": 339, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports3-es6.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports3-es6.json index a68e35aa93de..f833d021f0b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports3-es6.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports3-es6.json @@ -543,7 +543,6 @@ "end": 344, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports3.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports3.json index ec4a0b7a5ac8..ffa166469f48 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports3.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports3.json @@ -543,7 +543,6 @@ "end": 328, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-amd.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-amd.json index 6d7767926aa1..ccba8b003a40 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-amd.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-amd.json @@ -31,7 +31,6 @@ "end": 126, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -547,7 +546,6 @@ "end": 402, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-es6.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-es6.json index a4fb556b741a..e7b8f5e51ceb 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-es6.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports4-es6.json @@ -31,7 +31,6 @@ "end": 131, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -547,7 +546,6 @@ "end": 407, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportsAndImports4.json b/crates/swc_ecma_parser/tests/tsc/exportsAndImports4.json index a4fb556b741a..e7b8f5e51ceb 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportsAndImports4.json +++ b/crates/swc_ecma_parser/tests/tsc/exportsAndImports4.json @@ -31,7 +31,6 @@ "end": 131, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -547,7 +546,6 @@ "end": 407, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/extendClassExpressionFromModule.json b/crates/swc_ecma_parser/tests/tsc/extendClassExpressionFromModule.json index 4ac953a228cc..50aae206104b 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendClassExpressionFromModule.json +++ b/crates/swc_ecma_parser/tests/tsc/extendClassExpressionFromModule.json @@ -57,7 +57,6 @@ "end": 123, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/for-of40.json b/crates/swc_ecma_parser/tests/tsc/for-of40.json index a05770e4d104..92b9e1d0c173 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-of40.json +++ b/crates/swc_ecma_parser/tests/tsc/for-of40.json @@ -170,8 +170,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -199,8 +198,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/for-of43.json b/crates/swc_ecma_parser/tests/tsc/for-of43.json index be971a3710ad..5afc5a7dadbd 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-of43.json +++ b/crates/swc_ecma_parser/tests/tsc/for-of43.json @@ -179,8 +179,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } }, { @@ -221,8 +220,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/for-of45.json b/crates/swc_ecma_parser/tests/tsc/for-of45.json index 6eea4a50c185..5cd48ea25291 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-of45.json +++ b/crates/swc_ecma_parser/tests/tsc/for-of45.json @@ -239,8 +239,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -268,8 +267,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/for-of46.json b/crates/swc_ecma_parser/tests/tsc/for-of46.json index e1c9c5e17297..a8caef640db0 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-of46.json +++ b/crates/swc_ecma_parser/tests/tsc/for-of46.json @@ -238,8 +238,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -268,8 +267,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/for-of47.json b/crates/swc_ecma_parser/tests/tsc/for-of47.json index a15f29cc3363..fae2f9d12916 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-of47.json +++ b/crates/swc_ecma_parser/tests/tsc/for-of47.json @@ -325,8 +325,7 @@ "value": "x", "optional": false } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json index e1521745588f..d28a006b785d 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json @@ -1655,8 +1655,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "body": { @@ -1821,8 +1820,7 @@ }, "value": "string", "raw": "\"string\"" - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/functionImplementationErrors.json b/crates/swc_ecma_parser/tests/tsc/functionImplementationErrors.json index bbbda5990e09..ad2be4b3baa8 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionImplementationErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/functionImplementationErrors.json @@ -580,8 +580,7 @@ }, "value": "m", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -697,8 +696,7 @@ }, "value": "m", "optional": false - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/functionImplementations.json b/crates/swc_ecma_parser/tests/tsc/functionImplementations.json index db307778d8c9..e13af5cd3995 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionImplementations.json +++ b/crates/swc_ecma_parser/tests/tsc/functionImplementations.json @@ -2489,8 +2489,7 @@ }, "value": 4.0, "raw": "4" - }, - "typeAnnotation": null + } } } ], @@ -2699,8 +2698,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -2984,8 +2982,7 @@ }, "value": "n", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json b/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json index ba08e785f36e..e152b1c125b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json @@ -55,8 +55,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } } } ], @@ -3933,8 +3932,7 @@ }, "value": 13.0, "raw": "13" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/functionParameterObjectRestAndInitializers.json b/crates/swc_ecma_parser/tests/tsc/functionParameterObjectRestAndInitializers.json index 90053f455883..5e8297b90465 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionParameterObjectRestAndInitializers.json +++ b/crates/swc_ecma_parser/tests/tsc/functionParameterObjectRestAndInitializers.json @@ -120,8 +120,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -335,8 +334,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } ], "body": { @@ -352,8 +350,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json index 9cb3804f3d33..0444a3eb03d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json @@ -15479,8 +15479,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -15687,8 +15686,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -15904,8 +15902,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -16102,8 +16099,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -16320,8 +16316,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -16547,8 +16542,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -16704,8 +16698,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -16881,8 +16874,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -17087,8 +17079,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -17309,8 +17300,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -17594,8 +17584,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -17837,8 +17826,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -18028,8 +18016,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -18239,8 +18226,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -18459,8 +18445,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -18660,8 +18645,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -18881,8 +18865,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -19111,8 +19094,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -19271,8 +19253,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -19451,8 +19432,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -19660,8 +19640,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -19885,8 +19864,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -20173,8 +20151,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -20419,8 +20396,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -20610,8 +20586,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -20821,8 +20796,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -21041,8 +21015,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -21242,8 +21215,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -21463,8 +21435,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -21693,8 +21664,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -21853,8 +21823,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -22033,8 +22002,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -22242,8 +22210,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -22467,8 +22434,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -22755,8 +22721,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -23001,8 +22966,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -23165,8 +23129,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -23350,8 +23313,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -23544,8 +23506,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -23719,8 +23680,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -23914,8 +23874,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -24118,8 +24077,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -24252,8 +24210,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -24406,8 +24363,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -24589,8 +24545,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -24788,8 +24743,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], @@ -25050,8 +25004,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -25270,8 +25223,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json index f95b1a99a3fe..df627b8c78dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json @@ -3123,8 +3123,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -3153,8 +3152,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json index 70df256a3b36..cbf95c84bb1d 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json @@ -3123,8 +3123,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -3153,8 +3152,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json index c31a09bd57d1..cde21f784b81 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json @@ -79,8 +79,7 @@ "end": 75, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -230,8 +229,7 @@ }, "value": "undefined", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -381,8 +379,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], @@ -577,8 +574,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -796,8 +792,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1061,8 +1056,7 @@ }, "value": "y", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1321,8 +1315,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json b/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json index 8d687aa241a1..d4e93adad6a1 100644 --- a/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json @@ -187,7 +187,6 @@ "end": 135, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -831,7 +830,6 @@ "end": 400, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -1502,7 +1500,6 @@ "end": 682, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importEquals2.json b/crates/swc_ecma_parser/tests/tsc/importEquals2.json index 309fec9aea33..9e74cb332a3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/importEquals2.json +++ b/crates/swc_ecma_parser/tests/tsc/importEquals2.json @@ -130,7 +130,6 @@ "end": 183, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importEqualsDeclaration.json b/crates/swc_ecma_parser/tests/tsc/importEqualsDeclaration.json index f1159ae134c0..e4912850335c 100644 --- a/crates/swc_ecma_parser/tests/tsc/importEqualsDeclaration.json +++ b/crates/swc_ecma_parser/tests/tsc/importEqualsDeclaration.json @@ -147,7 +147,6 @@ "end": 219, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": true, "id": { @@ -186,7 +185,6 @@ "end": 255, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importImportOnlyModule.json b/crates/swc_ecma_parser/tests/tsc/importImportOnlyModule.json index 3d0005aecccd..25ed21bb034f 100644 --- a/crates/swc_ecma_parser/tests/tsc/importImportOnlyModule.json +++ b/crates/swc_ecma_parser/tests/tsc/importImportOnlyModule.json @@ -123,7 +123,6 @@ "end": 144, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -204,7 +203,6 @@ "end": 265, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importNonExternalModule.json b/crates/swc_ecma_parser/tests/tsc/importNonExternalModule.json index 890a89de0223..e861e71d26a1 100644 --- a/crates/swc_ecma_parser/tests/tsc/importNonExternalModule.json +++ b/crates/swc_ecma_parser/tests/tsc/importNonExternalModule.json @@ -93,7 +93,6 @@ "end": 136, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importStatements.json b/crates/swc_ecma_parser/tests/tsc/importStatements.json index b642715b83d4..86ae263b25a1 100644 --- a/crates/swc_ecma_parser/tests/tsc/importStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/importStatements.json @@ -301,7 +301,6 @@ "end": 200, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -362,7 +361,6 @@ "end": 304, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -642,7 +640,6 @@ "end": 471, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -800,7 +797,6 @@ "end": 535, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json b/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json index b1546b4b6aa3..393159e902f0 100644 --- a/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json @@ -329,7 +329,6 @@ "end": 253, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -390,7 +389,6 @@ "end": 309, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -421,7 +419,6 @@ "end": 331, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -737,7 +734,6 @@ "end": 461, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -870,7 +866,6 @@ "end": 543, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importTsBeforeDTs.json b/crates/swc_ecma_parser/tests/tsc/importTsBeforeDTs.json index d095343f7446..de6146b14b3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTsBeforeDTs.json +++ b/crates/swc_ecma_parser/tests/tsc/importTsBeforeDTs.json @@ -145,7 +145,6 @@ "end": 182, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importsImplicitlyReadonly.json b/crates/swc_ecma_parser/tests/tsc/importsImplicitlyReadonly.json index 769d245fe68e..c5692466f0c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/importsImplicitlyReadonly.json +++ b/crates/swc_ecma_parser/tests/tsc/importsImplicitlyReadonly.json @@ -240,7 +240,6 @@ "end": 187, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/importsNotUsedAsValues_error.json b/crates/swc_ecma_parser/tests/tsc/importsNotUsedAsValues_error.json index 51754ed3bdde..3b27730beaaa 100644 --- a/crates/swc_ecma_parser/tests/tsc/importsNotUsedAsValues_error.json +++ b/crates/swc_ecma_parser/tests/tsc/importsNotUsedAsValues_error.json @@ -1664,7 +1664,6 @@ "end": 901, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -1830,7 +1829,6 @@ "end": 989, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -1947,7 +1945,6 @@ "end": 1125, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/invalidImportAliasIdentifiers.json b/crates/swc_ecma_parser/tests/tsc/invalidImportAliasIdentifiers.json index 8b1c94b4b300..b3eff28982ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidImportAliasIdentifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidImportAliasIdentifiers.json @@ -55,7 +55,6 @@ "end": 89, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -158,7 +157,6 @@ "end": 135, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -249,7 +247,6 @@ "end": 176, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -352,7 +349,6 @@ "end": 224, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern11.json b/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern11.json index 5db3430c1bc2..4be148d01e9f 100644 --- a/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern11.json +++ b/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern11.json @@ -445,8 +445,7 @@ }, "arguments": null, "typeArguments": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern12.json b/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern12.json index aa63e1b2f6ef..bdc3a038c629 100644 --- a/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern12.json +++ b/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern12.json @@ -459,8 +459,7 @@ }, "arguments": null, "typeArguments": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern20.json b/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern20.json index 3a0d96ce0007..8fffef30f7b4 100644 --- a/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern20.json +++ b/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern20.json @@ -463,8 +463,7 @@ }, "arguments": null, "typeArguments": null - }, - "typeAnnotation": null + } } ], "optional": false, @@ -520,8 +519,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern9.json b/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern9.json index 8e5c1282bb35..d9916b710f1e 100644 --- a/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern9.json +++ b/crates/swc_ecma_parser/tests/tsc/iterableArrayPattern9.json @@ -88,8 +88,7 @@ }, "arguments": null, "typeArguments": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassLeadingOptional.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassLeadingOptional.json index 1fdd3fb8e1bc..244f3dc8059f 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassLeadingOptional.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassLeadingOptional.json @@ -87,8 +87,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsComputedNames.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsComputedNames.json index fabd73c6ada7..223a153fc633 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsComputedNames.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsComputedNames.json @@ -217,8 +217,7 @@ }, "value": 12.0, "raw": "12" - }, - "typeAnnotation": null + } } } ], @@ -359,8 +358,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "body": { @@ -680,8 +678,7 @@ }, "value": "InnerSym", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsFunctionClassesCjsExportAssignment.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsFunctionClassesCjsExportAssignment.json index a5e8cd44b2d6..e46d054d04a5 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsFunctionClassesCjsExportAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsFunctionClassesCjsExportAssignment.json @@ -729,8 +729,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/leaveOptionalParameterAsWritten.json b/crates/swc_ecma_parser/tests/tsc/leaveOptionalParameterAsWritten.json index b4183fd0868a..50eb684bb853 100644 --- a/crates/swc_ecma_parser/tests/tsc/leaveOptionalParameterAsWritten.json +++ b/crates/swc_ecma_parser/tests/tsc/leaveOptionalParameterAsWritten.json @@ -179,7 +179,6 @@ "end": 306, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypes2.json b/crates/swc_ecma_parser/tests/tsc/literalTypes2.json index b81ecea53d80..298b161a5496 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypes2.json @@ -183,8 +183,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -222,8 +221,7 @@ }, "value": "abc", "raw": "\"abc\"" - }, - "typeAnnotation": null + } } }, { @@ -260,8 +258,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } } }, { @@ -317,8 +314,7 @@ "value": "A", "optional": false } - }, - "typeAnnotation": null + } } } ], @@ -1617,8 +1613,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -1681,8 +1676,7 @@ }, "value": "abc", "raw": "\"abc\"" - }, - "typeAnnotation": null + } } }, { @@ -1743,8 +1737,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } } }, { @@ -1839,8 +1832,7 @@ "value": "A", "optional": false } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypesAndDestructuring.json b/crates/swc_ecma_parser/tests/tsc/literalTypesAndDestructuring.json index 4357196b0b7b..7d7346c38f87 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypesAndDestructuring.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypesAndDestructuring.json @@ -274,8 +274,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } } ], @@ -360,8 +359,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } } ], @@ -454,8 +452,7 @@ "value": 2.0, "raw": "2" } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypesWidenInParameterPosition.json b/crates/swc_ecma_parser/tests/tsc/literalTypesWidenInParameterPosition.json index 1f041236836b..88953ecca3dd 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypesWidenInParameterPosition.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypesWidenInParameterPosition.json @@ -120,8 +120,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/missingAndExcessProperties.json b/crates/swc_ecma_parser/tests/tsc/missingAndExcessProperties.json index 79c50aa91002..6ee309a750a3 100644 --- a/crates/swc_ecma_parser/tests/tsc/missingAndExcessProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/missingAndExcessProperties.json @@ -664,8 +664,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -791,8 +790,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], @@ -880,8 +878,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -923,8 +920,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportAlias.json b/crates/swc_ecma_parser/tests/tsc/moduleExportAlias.json index 828a122597af..f30cfe830851 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportAlias.json @@ -13,7 +13,6 @@ "end": 85, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension2.json b/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension2.json index d4ab47dd773c..10b65f30371b 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension2.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension2.json @@ -13,7 +13,6 @@ "end": 166, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension7.json b/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension7.json index c84d8cd542a6..df5f90bcd3fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension7.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleResolutionWithoutExtension7.json @@ -13,7 +13,6 @@ "end": 165, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/moduleScoping.json b/crates/swc_ecma_parser/tests/tsc/moduleScoping.json index 47f19093ad65..2139ed95f0c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleScoping.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleScoping.json @@ -282,7 +282,6 @@ "end": 305, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/nameDelimitedBySlashes.json b/crates/swc_ecma_parser/tests/tsc/nameDelimitedBySlashes.json index f751ada5bca7..64b7b4590a3d 100644 --- a/crates/swc_ecma_parser/tests/tsc/nameDelimitedBySlashes.json +++ b/crates/swc_ecma_parser/tests/tsc/nameDelimitedBySlashes.json @@ -63,7 +63,6 @@ "end": 132, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/nameWithFileExtension.json b/crates/swc_ecma_parser/tests/tsc/nameWithFileExtension.json index a11af79cc0f4..6fcb0eb0ae8b 100644 --- a/crates/swc_ecma_parser/tests/tsc/nameWithFileExtension.json +++ b/crates/swc_ecma_parser/tests/tsc/nameWithFileExtension.json @@ -63,7 +63,6 @@ "end": 125, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/nameWithRelativePaths.json b/crates/swc_ecma_parser/tests/tsc/nameWithRelativePaths.json index aab3ced83a38..a92b13776aa3 100644 --- a/crates/swc_ecma_parser/tests/tsc/nameWithRelativePaths.json +++ b/crates/swc_ecma_parser/tests/tsc/nameWithRelativePaths.json @@ -211,7 +211,6 @@ "end": 270, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -250,7 +249,6 @@ "end": 309, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -289,7 +287,6 @@ "end": 353, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator6.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator6.json index 41a01fa46cbe..e19d869b6845 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator6.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator6.json @@ -110,8 +110,7 @@ "value": "bar", "raw": "\"bar\"" } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterBindingPattern.2.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterBindingPattern.2.json index b3e70c945126..d9290d753d9b 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterBindingPattern.2.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterBindingPattern.2.json @@ -209,8 +209,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], @@ -426,8 +425,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterBindingPattern.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterBindingPattern.json index 537c96237db4..85eff3590872 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterBindingPattern.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterBindingPattern.json @@ -209,8 +209,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterInitializer.2.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterInitializer.2.json index 354099c6d68e..093d02989e3b 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterInitializer.2.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterInitializer.2.json @@ -181,8 +181,7 @@ "value": "d", "raw": "\"d\"" } - }, - "typeAnnotation": null + } } ], "body": { @@ -365,8 +364,7 @@ "value": "d", "raw": "\"d\"" } - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -395,8 +393,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterInitializer.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterInitializer.json index ad7a5a0b0d13..133312589199 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInParameterInitializer.json @@ -181,8 +181,7 @@ "value": "d", "raw": "\"d\"" } - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json b/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json index 5c7c43b13fd5..8f8aea9628cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json @@ -857,8 +857,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "body": { @@ -1518,8 +1517,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json b/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json index aee1174c9088..afcd0b1040c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json @@ -857,8 +857,7 @@ } } ] - }, - "typeAnnotation": null + } } ], "body": { @@ -1518,8 +1517,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/optionalBindingParameters4.json b/crates/swc_ecma_parser/tests/tsc/optionalBindingParameters4.json index eca20cc9017f..60005a235807 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalBindingParameters4.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalBindingParameters4.json @@ -74,8 +74,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.2.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.2.json index fe17f20359fe..c9add1ea43b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.2.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.2.json @@ -259,8 +259,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], @@ -500,8 +499,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.json index 48dce6052f30..8a5441ddd964 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.json @@ -259,8 +259,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.2.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.2.json index d63412ae8493..8e3a61e61248 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.2.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.2.json @@ -231,8 +231,7 @@ "optional": false } } - }, - "typeAnnotation": null + } } ], "body": { @@ -423,8 +422,7 @@ "optional": false } } - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -453,8 +451,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.json index d9f19daeaf0c..145eb3e83f36 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.json @@ -231,8 +231,7 @@ "optional": false } } - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/optionalMethods.json b/crates/swc_ecma_parser/tests/tsc/optionalMethods.json index 6a341bd83f6d..0cb846070547 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalMethods.json @@ -961,8 +961,7 @@ }, "value": 10.0, "raw": "10" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parameterInitializersBackwardReferencing.json b/crates/swc_ecma_parser/tests/tsc/parameterInitializersBackwardReferencing.json index 3716c73f7c5d..56bec3b161d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/parameterInitializersBackwardReferencing.json +++ b/crates/swc_ecma_parser/tests/tsc/parameterInitializersBackwardReferencing.json @@ -111,8 +111,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -307,8 +306,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -323,8 +321,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing.2.json b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing.2.json index b08a8a53c833..82a16bee8dfb 100644 --- a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing.2.json +++ b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing.2.json @@ -179,8 +179,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } } ], @@ -384,8 +383,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } }, { @@ -423,8 +421,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing.json b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing.json index af4ff7a4b093..b30ef36eb201 100644 --- a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing.json +++ b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing.json @@ -75,8 +75,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -114,8 +113,7 @@ }, "value": "b", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -225,8 +223,7 @@ }, "value": "b", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -264,8 +261,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -375,8 +371,7 @@ }, "value": "b", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -414,8 +409,7 @@ }, "value": "c", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -453,8 +447,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -582,8 +575,7 @@ }, "value": "b", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -751,8 +743,7 @@ }, "value": "b", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -899,8 +890,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } }, { @@ -938,8 +928,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], @@ -1038,8 +1027,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } }, { @@ -1077,8 +1065,7 @@ }, "value": 3.0, "raw": "3" - }, - "typeAnnotation": null + } } } ], @@ -1175,8 +1162,7 @@ }, "value": "b", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1214,8 +1200,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], @@ -1285,8 +1270,7 @@ }, "value": "b", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1324,8 +1308,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], @@ -1426,8 +1409,7 @@ }, "value": "b", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1456,8 +1438,7 @@ }, "value": "c", "optional": false - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -1486,8 +1467,7 @@ }, "value": "d", "optional": false - }, - "typeAnnotation": null + } } ], "body": { @@ -1644,8 +1624,7 @@ "async": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } }, { @@ -1693,8 +1672,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1.json b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1.json index 3eaecb5d1c5c..b0395be8e75d 100644 --- a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1.json +++ b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1.json @@ -113,8 +113,7 @@ }, "value": "foo", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -290,8 +289,7 @@ }, "value": "foo", "optional": false - }, - "typeAnnotation": null + } } ], "body": { @@ -308,8 +306,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -469,8 +466,7 @@ }, "value": "foo", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -508,8 +504,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } } ], @@ -621,8 +616,7 @@ }, "value": "foo", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -714,8 +708,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -807,8 +800,7 @@ }, "value": "async", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1098,8 +1090,7 @@ }, "value": 12.0, "raw": "12" - }, - "typeAnnotation": null + } } }, { @@ -1140,8 +1131,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1249,8 +1239,7 @@ }, "value": "foo1", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1_es6.json b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1_es6.json index 024a635eb75a..c2ec559e01e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/parameterInitializersForwardReferencing1_es6.json @@ -113,8 +113,7 @@ }, "value": "foo", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -290,8 +289,7 @@ }, "value": "foo", "optional": false - }, - "typeAnnotation": null + } } ], "body": { @@ -308,8 +306,7 @@ "generator": false, "typeParameters": null, "returnType": null - }, - "typeAnnotation": null + } } } ], @@ -469,8 +466,7 @@ }, "value": "foo", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -508,8 +504,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } } ], @@ -621,8 +616,7 @@ }, "value": "foo", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -714,8 +708,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -807,8 +800,7 @@ }, "value": "async", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1098,8 +1090,7 @@ }, "value": 12.0, "raw": "12" - }, - "typeAnnotation": null + } } }, { @@ -1140,8 +1131,7 @@ }, "value": "x", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -1249,8 +1239,7 @@ }, "value": "foo1", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parserCastVersusArrowFunction1.json b/crates/swc_ecma_parser/tests/tsc/parserCastVersusArrowFunction1.json index 41917fa3e6e9..435b7c81237a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserCastVersusArrowFunction1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserCastVersusArrowFunction1.json @@ -434,8 +434,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } }, { "type": "AssignmentPattern", @@ -464,8 +463,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserImportDeclaration1.json b/crates/swc_ecma_parser/tests/tsc/parserImportDeclaration1.json index 53ea65979cc2..d7d920db6b3b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserImportDeclaration1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserImportDeclaration1.json @@ -13,7 +13,6 @@ "end": 51, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserParameterList14.json b/crates/swc_ecma_parser/tests/tsc/parserParameterList14.json index 27109ae67e2d..6c6bd5e8b8fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserParameterList14.json +++ b/crates/swc_ecma_parser/tests/tsc/parserParameterList14.json @@ -80,8 +80,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parserParameterList15.json b/crates/swc_ecma_parser/tests/tsc/parserParameterList15.json index b11d27ea1950..3de3673bf919 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserParameterList15.json +++ b/crates/swc_ecma_parser/tests/tsc/parserParameterList15.json @@ -55,8 +55,7 @@ }, "value": 4.0, "raw": "4" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parserParameterList16.json b/crates/swc_ecma_parser/tests/tsc/parserParameterList16.json index b1a1fab5defc..e0941b06e537 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserParameterList16.json +++ b/crates/swc_ecma_parser/tests/tsc/parserParameterList16.json @@ -80,8 +80,7 @@ }, "value": 4.0, "raw": "4" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parserParameterList17.json b/crates/swc_ecma_parser/tests/tsc/parserParameterList17.json index 5c2c5a36eede..4ad8f349773d 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserParameterList17.json +++ b/crates/swc_ecma_parser/tests/tsc/parserParameterList17.json @@ -79,8 +79,7 @@ }, "value": 4.0, "raw": "4" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json index e22e436ea332..36cdf5c34ff0 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json @@ -496,8 +496,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource14.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource14.json index ec9c939bdd75..a214ebca1e1e 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource14.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource14.json @@ -35508,8 +35508,7 @@ "value": "Default", "optional": false } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/preserveValueImports.json b/crates/swc_ecma_parser/tests/tsc/preserveValueImports.json index ee42d2ff338a..322d69c7eff2 100644 --- a/crates/swc_ecma_parser/tests/tsc/preserveValueImports.json +++ b/crates/swc_ecma_parser/tests/tsc/preserveValueImports.json @@ -325,7 +325,6 @@ "end": 363, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -364,7 +363,6 @@ "end": 391, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameFieldDestructuredBinding.json b/crates/swc_ecma_parser/tests/tsc/privateNameFieldDestructuredBinding.json index 0133826a09ca..c50d9f0e83e2 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameFieldDestructuredBinding.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameFieldDestructuredBinding.json @@ -1114,8 +1114,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -1188,8 +1187,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1308,8 +1306,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1417,8 +1414,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticFieldDestructuredBinding.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticFieldDestructuredBinding.json index 82755c0cd94e..ecf8754c7fce 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticFieldDestructuredBinding.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticFieldDestructuredBinding.json @@ -1118,8 +1118,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } }, { @@ -1194,8 +1193,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1316,8 +1314,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1425,8 +1422,7 @@ }, "value": 2.0, "raw": "2" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json index 56f82bbb5d17..94a93227301c 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json @@ -7205,8 +7205,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/reexportClassDefinition.json b/crates/swc_ecma_parser/tests/tsc/reexportClassDefinition.json index dfcb93695862..9831f93c826a 100644 --- a/crates/swc_ecma_parser/tests/tsc/reexportClassDefinition.json +++ b/crates/swc_ecma_parser/tests/tsc/reexportClassDefinition.json @@ -57,7 +57,6 @@ "end": 122, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -137,7 +136,6 @@ "end": 203, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/relativePathMustResolve.json b/crates/swc_ecma_parser/tests/tsc/relativePathMustResolve.json index a5ed5836b795..770e73ce61fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/relativePathMustResolve.json +++ b/crates/swc_ecma_parser/tests/tsc/relativePathMustResolve.json @@ -63,7 +63,6 @@ "end": 123, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/relativePathToDeclarationFile.json b/crates/swc_ecma_parser/tests/tsc/relativePathToDeclarationFile.json index e9c3d12e13bf..6d37b1bea53f 100644 --- a/crates/swc_ecma_parser/tests/tsc/relativePathToDeclarationFile.json +++ b/crates/swc_ecma_parser/tests/tsc/relativePathToDeclarationFile.json @@ -307,7 +307,6 @@ "end": 351, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -346,7 +345,6 @@ "end": 386, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -385,7 +383,6 @@ "end": 427, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern1.json b/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern1.json index fdca75e78db6..15c92acece0d 100644 --- a/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern1.json +++ b/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern1.json @@ -173,8 +173,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern2.json b/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern2.json index 61c4b8acc545..0227eeca5992 100644 --- a/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern2.json +++ b/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern2.json @@ -174,8 +174,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern3.json b/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern3.json index 8742cbf96ba6..2edb5d948cb7 100644 --- a/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern3.json +++ b/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern3.json @@ -294,8 +294,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } ], "optional": false, diff --git a/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern4.json b/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern4.json index d73aa50d0870..e1ef3cd5baac 100644 --- a/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern4.json +++ b/crates/swc_ecma_parser/tests/tsc/restElementWithAssignmentPattern4.json @@ -295,8 +295,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/tsc/restElementWithNullInitializer.json b/crates/swc_ecma_parser/tests/tsc/restElementWithNullInitializer.json index f847dc8b9aa4..8144e343a046 100644 --- a/crates/swc_ecma_parser/tests/tsc/restElementWithNullInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/restElementWithNullInitializer.json @@ -79,8 +79,7 @@ "end": 28, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -179,8 +178,7 @@ }, "value": "undefined", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -278,8 +276,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -377,8 +374,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/scannerImportDeclaration1.json b/crates/swc_ecma_parser/tests/tsc/scannerImportDeclaration1.json index 53ea65979cc2..d7d920db6b3b 100644 --- a/crates/swc_ecma_parser/tests/tsc/scannerImportDeclaration1.json +++ b/crates/swc_ecma_parser/tests/tsc/scannerImportDeclaration1.json @@ -13,7 +13,6 @@ "end": 51, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/shadowedInternalModule.json b/crates/swc_ecma_parser/tests/tsc/shadowedInternalModule.json index a312ca893d2c..19f0f86829a7 100644 --- a/crates/swc_ecma_parser/tests/tsc/shadowedInternalModule.json +++ b/crates/swc_ecma_parser/tests/tsc/shadowedInternalModule.json @@ -375,7 +375,6 @@ "end": 249, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -705,7 +704,6 @@ "end": 462, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -888,7 +886,6 @@ "end": 562, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { @@ -999,7 +996,6 @@ "end": 617, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -1152,7 +1148,6 @@ "end": 697, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { @@ -1263,7 +1258,6 @@ "end": 755, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers1.json b/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers1.json index 30eddcad063a..5479a7000879 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers1.json +++ b/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers1.json @@ -1384,8 +1384,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1746,8 +1745,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers2.json b/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers2.json index 85504de5506d..aa2c289c634e 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers2.json +++ b/crates/swc_ecma_parser/tests/tsc/thisAndSuperInStaticMembers2.json @@ -1384,8 +1384,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } ], "optional": false, @@ -1746,8 +1745,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/topLevelAmbientModule.json b/crates/swc_ecma_parser/tests/tsc/topLevelAmbientModule.json index 66609799610e..c96a2c7d5cab 100644 --- a/crates/swc_ecma_parser/tests/tsc/topLevelAmbientModule.json +++ b/crates/swc_ecma_parser/tests/tsc/topLevelAmbientModule.json @@ -100,7 +100,6 @@ "end": 178, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/topLevelFileModule.json b/crates/swc_ecma_parser/tests/tsc/topLevelFileModule.json index ad36c4b4c334..c47fad4c9a9f 100644 --- a/crates/swc_ecma_parser/tests/tsc/topLevelFileModule.json +++ b/crates/swc_ecma_parser/tests/tsc/topLevelFileModule.json @@ -127,7 +127,6 @@ "end": 186, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -166,7 +165,6 @@ "end": 220, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/topLevelFileModuleMissing.json b/crates/swc_ecma_parser/tests/tsc/topLevelFileModuleMissing.json index ca606e001ac2..c59884f937e1 100644 --- a/crates/swc_ecma_parser/tests/tsc/topLevelFileModuleMissing.json +++ b/crates/swc_ecma_parser/tests/tsc/topLevelFileModuleMissing.json @@ -70,7 +70,6 @@ "end": 125, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/topLevelModuleDeclarationAndFile.json b/crates/swc_ecma_parser/tests/tsc/topLevelModuleDeclarationAndFile.json index d706e79e6c37..3f772fbec03a 100644 --- a/crates/swc_ecma_parser/tests/tsc/topLevelModuleDeclarationAndFile.json +++ b/crates/swc_ecma_parser/tests/tsc/topLevelModuleDeclarationAndFile.json @@ -184,7 +184,6 @@ "end": 255, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/tupleElementTypes4.json b/crates/swc_ecma_parser/tests/tsc/tupleElementTypes4.json index 9f06d88cab8c..ff5f7392b7be 100644 --- a/crates/swc_ecma_parser/tests/tsc/tupleElementTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/tupleElementTypes4.json @@ -104,8 +104,7 @@ } } ] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression1.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression1.json index 32024cb51e3f..261a3556c029 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression1.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression1.json @@ -117,8 +117,7 @@ "typeParams": null, "superTypeParams": null, "implements": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression2.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression2.json index 4148df5851ce..f40e30c9cb38 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression2.json @@ -117,8 +117,7 @@ "typeParams": null, "superTypeParams": null, "implements": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression3.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression3.json index e65f8705dec4..9ce85260d076 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression3.json @@ -117,8 +117,7 @@ "typeParams": null, "superTypeParams": null, "implements": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromJSInitializer.json b/crates/swc_ecma_parser/tests/tsc/typeFromJSInitializer.json index 9c8e963f0c2e..8c773020399b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromJSInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromJSInitializer.json @@ -1075,8 +1075,7 @@ "end": 606, "ctxt": 0 } - }, - "typeAnnotation": null + } } }, { @@ -1114,8 +1113,7 @@ }, "value": "n", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -1152,8 +1150,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromJSInitializer4.json b/crates/swc_ecma_parser/tests/tsc/typeFromJSInitializer4.json index d3a48762fc54..aa9d6dddd287 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromJSInitializer4.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromJSInitializer4.json @@ -86,8 +86,7 @@ "end": 231, "ctxt": 0 } - }, - "typeAnnotation": null + } } }, { @@ -125,8 +124,7 @@ }, "value": "n", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -163,8 +161,7 @@ "ctxt": 0 }, "elements": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json index b48aaccd844a..f8f2c004e396 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json @@ -359,8 +359,7 @@ "end": 414, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -1157,8 +1156,7 @@ "end": 1136, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -2375,8 +2373,7 @@ "end": 2289, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -3408,8 +3405,7 @@ "end": 3076, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -4375,8 +4371,7 @@ "end": 4001, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -4712,8 +4707,7 @@ "end": 4257, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -5049,8 +5043,7 @@ "end": 4513, "ctxt": 0 } - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInConstructorParamList.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInConstructorParamList.json index 3094f8b43ac9..728a7274ef7b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInConstructorParamList.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInConstructorParamList.json @@ -77,8 +77,7 @@ "end": 146, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/typeofANonExportedType.json b/crates/swc_ecma_parser/tests/tsc/typeofANonExportedType.json index 45c0131996c1..7c792eba153b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofANonExportedType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofANonExportedType.json @@ -1292,7 +1292,6 @@ "end": 486, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeofAnExportedType.json b/crates/swc_ecma_parser/tests/tsc/typeofAnExportedType.json index 877379ffe7c6..4b7999287c9f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofAnExportedType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofAnExportedType.json @@ -1332,7 +1332,6 @@ "end": 528, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/typesOnlyExternalModuleStillHasInstance.json b/crates/swc_ecma_parser/tests/tsc/typesOnlyExternalModuleStillHasInstance.json index 01cf945b9f37..661d246d8a94 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesOnlyExternalModuleStillHasInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/typesOnlyExternalModuleStillHasInstance.json @@ -262,7 +262,6 @@ "end": 220, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json index a848f94fe578..3e7a6e6b29f7 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json @@ -6276,8 +6276,7 @@ }, "value": "s", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -7310,8 +7309,7 @@ }, "value": "s", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -9628,8 +9626,7 @@ }, "value": "s", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json index ca26bbb99f7d..25641574ccf3 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json @@ -6193,8 +6193,7 @@ }, "value": "s", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -7227,8 +7226,7 @@ }, "value": "s", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -9545,8 +9543,7 @@ }, "value": "s", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxInternalImportEquals.json b/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxInternalImportEquals.json index 639b5cd2044f..7a0335582370 100644 --- a/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxInternalImportEquals.json +++ b/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxInternalImportEquals.json @@ -25,7 +25,6 @@ "end": 87, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -173,7 +172,6 @@ "end": 179, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -217,7 +215,6 @@ "end": 198, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxNoElisionCJS.json b/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxNoElisionCJS.json index 16ef5a5a0050..a5cb563bf9dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxNoElisionCJS.json +++ b/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxNoElisionCJS.json @@ -61,7 +61,6 @@ "end": 194, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -228,7 +227,6 @@ "end": 330, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -267,7 +265,6 @@ "end": 362, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": true, "id": { @@ -372,7 +369,6 @@ "end": 477, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": true, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxRestrictionsESM.json b/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxRestrictionsESM.json index 29192234da30..d6707bf4126e 100644 --- a/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxRestrictionsESM.json +++ b/crates/swc_ecma_parser/tests/tsc/verbatimModuleSyntaxRestrictionsESM.json @@ -217,7 +217,6 @@ "end": 423, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { @@ -256,7 +255,6 @@ "end": 471, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": true, "id": { diff --git a/crates/swc_ecma_parser/tests/tsc/witness.json b/crates/swc_ecma_parser/tests/tsc/witness.json index 714beacd9bd7..01ae1e88d5b6 100644 --- a/crates/swc_ecma_parser/tests/tsc/witness.json +++ b/crates/swc_ecma_parser/tests/tsc/witness.json @@ -146,8 +146,7 @@ }, "value": "pInit", "optional": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/typescript/arrow-function/async-param/input.ts.json b/crates/swc_ecma_parser/tests/typescript/arrow-function/async-param/input.ts.json index 9a92164494ff..28ad1bdc91ca 100644 --- a/crates/swc_ecma_parser/tests/typescript/arrow-function/async-param/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/arrow-function/async-param/input.ts.json @@ -146,8 +146,7 @@ }, "value": 1.0, "raw": "1" - }, - "typeAnnotation": null + } }, { "type": "Identifier", diff --git a/crates/swc_ecma_parser/tests/typescript/arrow-function/default-parameter-values/input.ts.json b/crates/swc_ecma_parser/tests/typescript/arrow-function/default-parameter-values/input.ts.json index 5bdf5a9c4548..6ce104f17e55 100644 --- a/crates/swc_ecma_parser/tests/typescript/arrow-function/default-parameter-values/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/arrow-function/default-parameter-values/input.ts.json @@ -64,8 +64,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } ], "body": { diff --git a/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/arrow/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/arrow/input.ts.json index 0908fef8dea2..533bbb303e0d 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/arrow/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/arrow/input.ts.json @@ -85,8 +85,7 @@ }, "value": "Hello", "raw": "\"Hello\"" - }, - "typeAnnotation": null + } }, { "type": "Identifier", diff --git a/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/function/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/function/input.ts.json index db8c199f1d87..000cdf9a53e7 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/function/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/default-followed-by-type/function/input.ts.json @@ -71,8 +71,7 @@ }, "value": "Hello", "raw": "\"Hello\"" - }, - "typeAnnotation": null + } } }, { diff --git a/crates/swc_ecma_parser/tests/typescript/import/equals-require/input.ts.json b/crates/swc_ecma_parser/tests/typescript/import/equals-require/input.ts.json index 9e04559a21da..9b5d7b4c9c20 100644 --- a/crates/swc_ecma_parser/tests/typescript/import/equals-require/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/import/equals-require/input.ts.json @@ -13,7 +13,6 @@ "end": 25, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/typescript/import/equals-type-only/input.ts.json b/crates/swc_ecma_parser/tests/typescript/import/equals-type-only/input.ts.json index df079407d20d..4ce0a43e5668 100644 --- a/crates/swc_ecma_parser/tests/typescript/import/equals-type-only/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/import/equals-type-only/input.ts.json @@ -13,7 +13,6 @@ "end": 49, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": true, "id": { diff --git a/crates/swc_ecma_parser/tests/typescript/import/equals/input.ts.json b/crates/swc_ecma_parser/tests/typescript/import/equals/input.ts.json index f6f030265f40..a694f4e1a97b 100644 --- a/crates/swc_ecma_parser/tests/typescript/import/equals/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/import/equals/input.ts.json @@ -13,7 +13,6 @@ "end": 16, "ctxt": 0 }, - "declare": false, "isExport": false, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/typescript/import/export-import-require/input.ts.json b/crates/swc_ecma_parser/tests/typescript/import/export-import-require/input.ts.json index f4d29b62e1b4..35a9072f8a7d 100644 --- a/crates/swc_ecma_parser/tests/typescript/import/export-import-require/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/import/export-import-require/input.ts.json @@ -13,7 +13,6 @@ "end": 32, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/typescript/import/export-import-type-require/input.ts.json b/crates/swc_ecma_parser/tests/typescript/import/export-import-type-require/input.ts.json index 7b3a3d8e96b5..894f612b5e71 100644 --- a/crates/swc_ecma_parser/tests/typescript/import/export-import-type-require/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/import/export-import-type-require/input.ts.json @@ -13,7 +13,6 @@ "end": 45, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": true, "id": { diff --git a/crates/swc_ecma_parser/tests/typescript/import/export-import/input.ts.json b/crates/swc_ecma_parser/tests/typescript/import/export-import/input.ts.json index 3f914eb99f0f..530a06af3ff3 100644 --- a/crates/swc_ecma_parser/tests/typescript/import/export-import/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/import/export-import/input.ts.json @@ -13,7 +13,6 @@ "end": 23, "ctxt": 0 }, - "declare": false, "isExport": true, "isTypeOnly": false, "id": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1449/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-1449/input.ts.json index b3a349ff59f6..9899fe9e0c3b 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1449/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1449/input.ts.json @@ -97,8 +97,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/typescript/issue-3236/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-3236/input.ts.json index 96f20e706aaf..2bf9279b3d1e 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-3236/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-3236/input.ts.json @@ -55,8 +55,7 @@ }, "value": 0.0, "raw": "0" - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_parser/tests/typescript/next/stack-overflow/1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/next/stack-overflow/1/input.ts.json index 7da1f72dbdf9..b20cef0d16f7 100644 --- a/crates/swc_ecma_parser/tests/typescript/next/stack-overflow/1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/next/stack-overflow/1/input.ts.json @@ -1239,8 +1239,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -1641,8 +1640,7 @@ "end": 1130, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -6095,8 +6093,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } }, { @@ -6133,8 +6130,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -6172,8 +6168,7 @@ }, "value": "console", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -8236,8 +8231,7 @@ "ctxt": 0 }, "value": true - }, - "typeAnnotation": null + } } } ], @@ -11109,8 +11103,7 @@ }, "arguments": [], "typeArguments": null - }, - "typeAnnotation": null + } } } ], @@ -13714,8 +13707,7 @@ }, "value": "a", "optional": false - }, - "typeAnnotation": null + } } ], "body": { @@ -18475,8 +18467,7 @@ }, "value": "u", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -18943,8 +18934,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -29412,8 +29402,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -29450,8 +29439,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } } ], @@ -31679,8 +31667,7 @@ }, "value": "", "raw": "\"\"" - }, - "typeAnnotation": null + } } } ], @@ -33132,8 +33119,7 @@ }, "value": "i", "optional": false - }, - "typeAnnotation": null + } } }, { @@ -33198,8 +33184,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } }, { @@ -33240,8 +33225,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } } ], @@ -38380,8 +38364,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -42713,8 +42696,7 @@ "end": 34990, "ctxt": 0 } - }, - "typeAnnotation": null + } } } ], @@ -113226,8 +113208,7 @@ "value": 1.0, "raw": "1" } - }, - "typeAnnotation": null + } } }, { @@ -113265,8 +113246,7 @@ }, "value": "d", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -113502,8 +113482,7 @@ "value": 1.0, "raw": "1" } - }, - "typeAnnotation": null + } } }, { @@ -113541,8 +113520,7 @@ }, "value": "d", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -296610,8 +296588,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -301682,8 +301659,7 @@ }, "value": "n", "optional": false - }, - "typeAnnotation": null + } } } ], @@ -301698,8 +301674,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -303074,8 +303049,7 @@ "ctxt": 0 }, "properties": [] - }, - "typeAnnotation": null + } } } ], @@ -304031,8 +304005,7 @@ "ctxt": 0 }, "value": false - }, - "typeAnnotation": null + } } } ], diff --git a/crates/swc_ecma_quote_macros/src/ast/pat.rs b/crates/swc_ecma_quote_macros/src/ast/pat.rs index e7daab3c42f3..c01bc4755ef1 100644 --- a/crates/swc_ecma_quote_macros/src/ast/pat.rs +++ b/crates/swc_ecma_quote_macros/src/ast/pat.rs @@ -4,5 +4,5 @@ impl_struct!(BindingIdent, [id, type_ann]); impl_struct!(ArrayPat, [span, elems, optional, type_ann]); impl_struct!(ObjectPat, [span, props, optional, type_ann]); impl_struct!(RestPat, [span, dot3_token, arg, type_ann]); -impl_struct!(AssignPat, [span, left, right, type_ann]); +impl_struct!(AssignPat, [span, left, right]); impl_struct!(Param, [span, decorators, pat]); diff --git a/crates/swc_ecma_transforms_base/src/rename/ops.rs b/crates/swc_ecma_transforms_base/src/rename/ops.rs index 292af65eff41..2fe75b4e4bd4 100644 --- a/crates/swc_ecma_transforms_base/src/rename/ops.rs +++ b/crates/swc_ecma_transforms_base/src/rename/ops.rs @@ -500,7 +500,6 @@ impl<'a> VisitMut for Operator<'a> { span: p.span, left: renamed.into(), right: default_expr, - type_ann: None, })), None => renamed.into(), }, diff --git a/crates/swc_ecma_transforms_base/src/resolver/mod.rs b/crates/swc_ecma_transforms_base/src/resolver/mod.rs index 7f2e5c318c9f..68f3332b968b 100644 --- a/crates/swc_ecma_transforms_base/src/resolver/mod.rs +++ b/crates/swc_ecma_transforms_base/src/resolver/mod.rs @@ -588,7 +588,6 @@ impl<'a> VisitMut for Resolver<'a> { fn visit_mut_assign_pat(&mut self, node: &mut AssignPat) { // visit the type first so that it doesn't resolve any // identifiers from the others - node.type_ann.visit_mut_with(self); node.left.visit_mut_with(self); node.right.visit_mut_with(self); } diff --git a/crates/swc_ecma_transforms_compat/src/bugfixes/edge_default_param.rs b/crates/swc_ecma_transforms_compat/src/bugfixes/edge_default_param.rs index 5c5c4d588b8d..2bf1887cdd57 100644 --- a/crates/swc_ecma_transforms_compat/src/bugfixes/edge_default_param.rs +++ b/crates/swc_ecma_transforms_compat/src/bugfixes/edge_default_param.rs @@ -48,7 +48,6 @@ impl VisitMut for EdgeDefaultParam { span: *span, left: key.clone().into(), right: value.clone(), - type_ann: None, })), }); diff --git a/crates/swc_ecma_transforms_compat/src/es2015/block_scoping/operator.rs b/crates/swc_ecma_transforms_compat/src/es2015/block_scoping/operator.rs index 0e4e2d99e85f..5e5b1fbe6559 100644 --- a/crates/swc_ecma_transforms_compat/src/es2015/block_scoping/operator.rs +++ b/crates/swc_ecma_transforms_compat/src/es2015/block_scoping/operator.rs @@ -52,7 +52,6 @@ impl VisitMut for Rename { span: DUMMY_SP, left: Box::new(Pat::Ident(p.key.clone().into())), right: default, - type_ann: Default::default(), })), }); } diff --git a/crates/swc_ecma_transforms_compat/src/es2018/object_rest_spread.rs b/crates/swc_ecma_transforms_compat/src/es2018/object_rest_spread.rs index c7f1371233df..eeda52432abc 100644 --- a/crates/swc_ecma_transforms_compat/src/es2018/object_rest_spread.rs +++ b/crates/swc_ecma_transforms_compat/src/es2018/object_rest_spread.rs @@ -653,7 +653,6 @@ impl ObjectRest { span, left: var_ident.into(), right, - ..n }), } } @@ -741,12 +740,7 @@ impl ObjectRest { use_expr_for_assign, use_member_for_array, )); - return Pat::Assign(AssignPat { - span, - left, - right, - ..n - }); + return Pat::Assign(AssignPat { span, left, right }); } Pat::Array(n) => { let ArrayPat { span, elems, .. } = n; diff --git a/crates/swc_ecma_transforms_module/src/common_js.rs b/crates/swc_ecma_transforms_module/src/common_js.rs index 7589626c0a38..3ebc5a402b15 100644 --- a/crates/swc_ecma_transforms_module/src/common_js.rs +++ b/crates/swc_ecma_transforms_module/src/common_js.rs @@ -385,7 +385,6 @@ where if matches!( &*v, TsImportEqualsDecl { - declare: false, is_type_only: false, module_ref: TsModuleRef::TsExternalModuleRef(TsExternalModuleRef { .. }), .. diff --git a/crates/swc_ecma_transforms_module/src/module_decl_strip.rs b/crates/swc_ecma_transforms_module/src/module_decl_strip.rs index 8352cd428d94..272b6abc7d09 100644 --- a/crates/swc_ecma_transforms_module/src/module_decl_strip.rs +++ b/crates/swc_ecma_transforms_module/src/module_decl_strip.rs @@ -280,7 +280,7 @@ impl VisitMut for ModuleDeclStrip { /// export import foo = require("mod"); /// ``` fn visit_mut_ts_import_equals_decl(&mut self, n: &mut TsImportEqualsDecl) { - if n.is_type_only || n.declare { + if n.is_type_only { return; } diff --git a/crates/swc_ecma_transforms_proposal/src/decorators/legacy/metadata.rs b/crates/swc_ecma_transforms_proposal/src/decorators/legacy/metadata.rs index 22ffa33fb9ea..51ee2d574334 100644 --- a/crates/swc_ecma_transforms_proposal/src/decorators/legacy/metadata.rs +++ b/crates/swc_ecma_transforms_proposal/src/decorators/legacy/metadata.rs @@ -498,10 +498,7 @@ fn get_type_ann_of_pat(p: &Pat) -> Option<&TsTypeAnn> { Pat::Rest(p) => p.type_ann.as_deref(), Pat::Object(p) => p.type_ann.as_deref(), Pat::Assign(p) => { - return p - .type_ann - .as_deref() - .or_else(|| get_type_ann_of_pat(&p.left)); + return get_type_ann_of_pat(&p.left); } Pat::Invalid(_) => None, Pat::Expr(_) => None, diff --git a/crates/swc_ecma_transforms_typescript/src/import_export_assign.rs b/crates/swc_ecma_transforms_typescript/src/import_export_assign.rs index 11da68f3e0ce..25f8b58c8bae 100644 --- a/crates/swc_ecma_transforms_typescript/src/import_export_assign.rs +++ b/crates/swc_ecma_transforms_typescript/src/import_export_assign.rs @@ -89,7 +89,6 @@ impl VisitMut for ImportExportAssign { if matches!( &*v, TsImportEqualsDecl { - declare: false, is_type_only: false, module_ref: TsModuleRef::TsExternalModuleRef( TsExternalModuleRef { .. } diff --git a/crates/swc_ecma_transforms_typescript/src/strip.rs b/crates/swc_ecma_transforms_typescript/src/strip.rs index 1690d6671176..ddf48d8050f2 100644 --- a/crates/swc_ecma_transforms_typescript/src/strip.rs +++ b/crates/swc_ecma_transforms_typescript/src/strip.rs @@ -1118,10 +1118,6 @@ where is_type_only: true, module_ref: TsModuleRef::TsExternalModuleRef(..), .. - } | TsImportEqualsDecl { - declare: true, - module_ref: TsModuleRef::TsExternalModuleRef(..), - .. } ) => { @@ -1184,7 +1180,6 @@ where &*import, TsImportEqualsDecl { module_ref: TsModuleRef::TsEntityName(..), - declare: false, .. } ) => @@ -1886,7 +1881,6 @@ where span, left: i.into(), right, - type_ann: None, }), }, ) @@ -2301,10 +2295,6 @@ where is_type_only: true, module_ref: TsModuleRef::TsExternalModuleRef(..), .. - } | TsImportEqualsDecl { - declare: true, - module_ref: TsModuleRef::TsExternalModuleRef(..), - .. } ) => { @@ -2362,7 +2352,6 @@ where &*import, TsImportEqualsDecl { module_ref: TsModuleRef::TsEntityName(..), - declare: false, .. } ) => diff --git a/crates/swc_ecma_utils/src/lib.rs b/crates/swc_ecma_utils/src/lib.rs index 1db5aea3f004..9febb3d6f3f2 100644 --- a/crates/swc_ecma_utils/src/lib.rs +++ b/crates/swc_ecma_utils/src/lib.rs @@ -2968,7 +2968,6 @@ impl VisitMut for IdentRenamer<'_> { span: DUMMY_SP, left: Box::new(Pat::Ident(p.key.clone().into())), right: default, - type_ann: Default::default(), })), }); } diff --git a/crates/swc_ecma_visit/src/lib.rs b/crates/swc_ecma_visit/src/lib.rs index a3b67fa7e793..8e197200d5a5 100644 --- a/crates/swc_ecma_visit/src/lib.rs +++ b/crates/swc_ecma_visit/src/lib.rs @@ -1244,7 +1244,6 @@ define!({ pub span: Span, pub left: Box, pub right: Box, - pub type_ann: Option>, } pub struct RestPat { pub span: Span, @@ -1809,7 +1808,6 @@ define!({ } pub struct TsImportEqualsDecl { pub span: Span, - pub declare: bool, pub is_export: bool, pub is_type_only: bool, pub id: Ident, diff --git a/crates/swc_estree_compat/src/babelify/pat.rs b/crates/swc_estree_compat/src/babelify/pat.rs index 05fee1b8895f..bb39a7c371a0 100644 --- a/crates/swc_estree_compat/src/babelify/pat.rs +++ b/crates/swc_estree_compat/src/babelify/pat.rs @@ -230,9 +230,7 @@ impl Babelify for AssignPat { base: ctx.base(self.span), left: self.left.babelify(ctx).into(), right: Box::alloc().init(self.right.babelify(ctx).into()), - type_annotation: self - .type_ann - .map(|a| Box::alloc().init(a.babelify(ctx).into())), + type_annotation: None, decorators: Default::default(), } } diff --git a/crates/swc_estree_compat/src/swcify/pat.rs b/crates/swc_estree_compat/src/swcify/pat.rs index cce8ba01b2ed..deb051d5cda1 100644 --- a/crates/swc_estree_compat/src/swcify/pat.rs +++ b/crates/swc_estree_compat/src/swcify/pat.rs @@ -46,7 +46,6 @@ impl Swcify for AssignmentPattern { span: ctx.span(&self.base), left: Box::new(self.left.swcify(ctx)), right: self.right.swcify(ctx), - type_ann: None, } } }