From d6bc36ad00ec21f6949c370d889c50ab26acd978 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Tue, 14 May 2024 15:46:34 +0200 Subject: [PATCH 1/2] chore: remove unused, always empty fields from TsTypeElement - TsPropertySignature can not have params, type params, or an initializer. - TsGetterSignature can not be optional or readonly. - TsSetterSignature can not be optional or readonly. - TsMethodSignature can not be readonly. --- bindings/binding_core_wasm/src/types.rs | 9 --------- crates/swc_ecma_ast/src/typescript.rs | 10 ---------- crates/swc_ecma_codegen/src/typescript.rs | 13 ------------ crates/swc_ecma_parser/src/error.rs | 4 ++++ .../swc_ecma_parser/src/parser/typescript.rs | 20 ++++++++----------- .../type-lit/optional-getter/input.ts | 3 +++ .../optional-getter/input.ts.swc-stderr | 7 +++++++ .../type-lit/optional-setter/input.ts | 3 +++ .../optional-setter/input.ts.swc-stderr | 7 +++++++ .../type-lit/readonly-getter/input.ts | 3 +++ .../readonly-getter/input.ts.swc-stderr | 7 +++++++ .../type-lit/readonly-method/input.ts | 3 +++ .../readonly-method/input.ts.swc-stderr | 7 +++++++ .../type-lit/readonly-setter/input.ts | 3 +++ .../readonly-setter/input.ts.swc-stderr | 7 +++++++ .../src/resolver/mod.rs | 3 --- .../tests/ts_resolver.rs | 3 --- crates/swc_ecma_visit/src/lib.rs | 8 -------- crates/swc_estree_ast/src/typescript.rs | 2 -- .../src/babelify/typescript.rs | 1 - 20 files changed, 62 insertions(+), 61 deletions(-) create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts.swc-stderr create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts.swc-stderr create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts.swc-stderr create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts.swc-stderr create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts.swc-stderr diff --git a/bindings/binding_core_wasm/src/types.rs b/bindings/binding_core_wasm/src/types.rs index 8949dba7faee..4380d06c3716 100644 --- a/bindings/binding_core_wasm/src/types.rs +++ b/bindings/binding_core_wasm/src/types.rs @@ -2376,37 +2376,28 @@ export interface TsPropertySignature extends Node, HasSpan { computed: boolean; optional: boolean; - init?: Expression; - params: TsFnParameter[]; - typeAnnotation?: TsTypeAnnotation; - typeParams?: TsTypeParameterDeclaration; } export interface TsGetterSignature extends Node, HasSpan { type: "TsGetterSignature"; - readonly: boolean; key: Expression; computed: boolean; - optional: boolean; typeAnnotation?: TsTypeAnnotation; } export interface TsSetterSignature extends Node, HasSpan { type: "TsSetterSignature"; - readonly: boolean; key: Expression; computed: boolean; - optional: boolean; param: TsFnParameter; } export interface TsMethodSignature extends Node, HasSpan { type: "TsMethodSignature"; - readonly: boolean; key: Expression; computed: boolean; optional: boolean; diff --git a/crates/swc_ecma_ast/src/typescript.rs b/crates/swc_ecma_ast/src/typescript.rs index d86dad68d79d..e94e6c7cb0d0 100644 --- a/crates/swc_ecma_ast/src/typescript.rs +++ b/crates/swc_ecma_ast/src/typescript.rs @@ -185,13 +185,8 @@ pub struct TsPropertySignature { pub key: Box, pub computed: bool, pub optional: bool, - #[cfg_attr(feature = "serde-impl", serde(default))] - pub init: Option>, - pub params: Vec, #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] pub type_ann: Option>, - #[cfg_attr(feature = "serde-impl", serde(default))] - pub type_params: Option>, } #[ast_node("TsGetterSignature")] @@ -199,10 +194,8 @@ pub struct TsPropertySignature { #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct TsGetterSignature { pub span: Span, - pub readonly: bool, pub key: Box, pub computed: bool, - pub optional: bool, #[cfg_attr(feature = "serde-impl", serde(default, rename = "typeAnnotation"))] pub type_ann: Option>, } @@ -212,10 +205,8 @@ pub struct TsGetterSignature { #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct TsSetterSignature { pub span: Span, - pub readonly: bool, pub key: Box, pub computed: bool, - pub optional: bool, pub param: TsFnParam, } @@ -224,7 +215,6 @@ pub struct TsSetterSignature { #[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))] pub struct TsMethodSignature { pub span: Span, - pub readonly: bool, pub key: Box, pub computed: bool, pub optional: bool, diff --git a/crates/swc_ecma_codegen/src/typescript.rs b/crates/swc_ecma_codegen/src/typescript.rs index 8b93251d8a3b..dc416aff9109 100644 --- a/crates/swc_ecma_codegen/src/typescript.rs +++ b/crates/swc_ecma_codegen/src/typescript.rs @@ -542,10 +542,6 @@ where fn emit_ts_method_signature(&mut self, n: &TsMethodSignature) -> Result { self.emit_leading_comments_of_span(n.span(), false)?; - if n.readonly { - keyword!("readonly"); - } - if n.computed { punct!("["); emit!(n.key); @@ -751,8 +747,6 @@ where punct!("?"); } - emit!(n.type_params); - // punct!("("); // self.emit_list(n.span, Some(&n.params), ListFormat::Parameters)?; // punct!(")"); @@ -762,13 +756,6 @@ where formatting_space!(); emit!(type_ann); } - - if let Some(init) = &n.init { - formatting_space!(); - punct!("="); - formatting_space!(); - emit!(init); - } } #[emitter] diff --git a/crates/swc_ecma_parser/src/error.rs b/crates/swc_ecma_parser/src/error.rs index 1715555dd478..37ebffe5b5ea 100644 --- a/crates/swc_ecma_parser/src/error.rs +++ b/crates/swc_ecma_parser/src/error.rs @@ -64,6 +64,7 @@ pub enum SyntaxError { ArrowNotAllowed, ExportNotAllowed, GetterSetterCannotBeReadonly, + GetterSetterCannotBeOptional, GetterParam, SetterParam, @@ -563,6 +564,9 @@ impl SyntaxError { SyntaxError::GetterSetterCannotBeReadonly => { "A getter or a setter cannot be readonly".into() } + SyntaxError::GetterSetterCannotBeOptional => { + "A getter or a setter cannot be optional".into() + } SyntaxError::GetterParam => "A `get` accessor cannot have parameters".into(), SyntaxError::SetterParam => "A `set` accessor must have exactly one parameter".into(), SyntaxError::RestPatInSetter => "Rest pattern is not allowed in setter".into(), diff --git a/crates/swc_ecma_parser/src/parser/typescript.rs b/crates/swc_ecma_parser/src/parser/typescript.rs index b02fa7d5c2dc..454534405a5c 100644 --- a/crates/swc_ecma_parser/src/parser/typescript.rs +++ b/crates/swc_ecma_parser/src/parser/typescript.rs @@ -1416,7 +1416,11 @@ impl Parser { let optional = eat!(self, '?'); - if !readonly && is_one_of!(self, '(', '<') { + if is_one_of!(self, '(', '<') { + if readonly { + syntax_error!(self, SyntaxError::ReadOnlyMethod) + } + let type_params = self.try_parse_ts_type_params(false, true)?; expect!(self, '('); let params = self.parse_ts_binding_list_for_signature()?; @@ -1432,7 +1436,6 @@ impl Parser { Ok(Either::Right(TsMethodSignature { span: span!(self, start), computed, - readonly, key, optional, type_params, @@ -1449,9 +1452,6 @@ impl Parser { readonly, key, optional, - init: None, - type_params: None, - params: vec![], type_ann, })) } @@ -1491,7 +1491,9 @@ impl Parser { if let Some(v) = self.try_parse_ts(|p| { let start = p.input.cur_pos(); - let readonly = p.parse_ts_modifier(&["readonly"], false)?.is_some(); + if readonly { + syntax_error!(p, SyntaxError::GetterSetterCannotBeReadonly) + } let is_get = if eat!(p, "get") { true @@ -1502,8 +1504,6 @@ impl Parser { let (computed, key) = p.parse_ts_property_name()?; - let optional = eat!(p, '?'); - if is_get { expect!(p, '('); expect!(p, ')'); @@ -1513,10 +1513,8 @@ impl Parser { Ok(Some(TsTypeElement::TsGetterSignature(TsGetterSignature { span: span!(p, start), - readonly, key, computed, - optional, type_ann, }))) } else { @@ -1531,10 +1529,8 @@ impl Parser { Ok(Some(TsTypeElement::TsSetterSignature(TsSetterSignature { span: span!(p, start), - readonly, key, computed, - optional, param, }))) } diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts new file mode 100644 index 000000000000..28dabd546976 --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts @@ -0,0 +1,3 @@ +export type A = { + get m?(): string; +} diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts.swc-stderr b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts.swc-stderr new file mode 100644 index 000000000000..a6499285fa0f --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-getter/input.ts.swc-stderr @@ -0,0 +1,7 @@ + + x Expected '{', got 'A' + ,-[$DIR/tests/typescript-errors/type-lit/optional-getter/input.ts:1:1] + 1 | export type A = { + : ^ + 2 | get m?(): string; + `---- diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts new file mode 100644 index 000000000000..a514f2c09490 --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts @@ -0,0 +1,3 @@ +export type A = { + set m?(val: string); +} \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts.swc-stderr b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts.swc-stderr new file mode 100644 index 000000000000..2fd02ef39bfd --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/optional-setter/input.ts.swc-stderr @@ -0,0 +1,7 @@ + + x Expected '{', got 'A' + ,-[$DIR/tests/typescript-errors/type-lit/optional-setter/input.ts:1:1] + 1 | export type A = { + : ^ + 2 | set m?(val: string); + `---- diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts new file mode 100644 index 000000000000..ece351c616cf --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts @@ -0,0 +1,3 @@ +export type A = { + readonly get m(): string; +} \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts.swc-stderr b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts.swc-stderr new file mode 100644 index 000000000000..e536adc34273 --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-getter/input.ts.swc-stderr @@ -0,0 +1,7 @@ + + x Expected '{', got 'A' + ,-[$DIR/tests/typescript-errors/type-lit/readonly-getter/input.ts:1:1] + 1 | export type A = { + : ^ + 2 | readonly get m(): string; + `---- diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts new file mode 100644 index 000000000000..f9ce4635e23c --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts @@ -0,0 +1,3 @@ +export type A = { + readonly m(): string; +} \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts.swc-stderr b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts.swc-stderr new file mode 100644 index 000000000000..fc886c270f0b --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-method/input.ts.swc-stderr @@ -0,0 +1,7 @@ + + x Expected '{', got 'A' + ,-[$DIR/tests/typescript-errors/type-lit/readonly-method/input.ts:1:1] + 1 | export type A = { + : ^ + 2 | readonly m(): string; + `---- diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts new file mode 100644 index 000000000000..3af8af428682 --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts @@ -0,0 +1,3 @@ +export type A = { + readonly set m(val: string); +} \ No newline at end of file diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts.swc-stderr b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts.swc-stderr new file mode 100644 index 000000000000..e77caaf746e7 --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-lit/readonly-setter/input.ts.swc-stderr @@ -0,0 +1,7 @@ + + x Expected '{', got 'A' + ,-[$DIR/tests/typescript-errors/type-lit/readonly-setter/input.ts:1:1] + 1 | export type A = { + : ^ + 2 | readonly set m(val: string); + `---- diff --git a/crates/swc_ecma_transforms_base/src/resolver/mod.rs b/crates/swc_ecma_transforms_base/src/resolver/mod.rs index 0de61dc4b412..c42b9168b6dc 100644 --- a/crates/swc_ecma_transforms_base/src/resolver/mod.rs +++ b/crates/swc_ecma_transforms_base/src/resolver/mod.rs @@ -1401,9 +1401,6 @@ impl<'a> VisitMut for Resolver<'a> { self.with_child(ScopeKind::Fn, |child| { child.in_type = true; - n.type_params.visit_mut_with(child); - n.init.visit_mut_with(child); - n.params.visit_mut_with(child); n.type_ann.visit_mut_with(child); }); } diff --git a/crates/swc_ecma_transforms_base/tests/ts_resolver.rs b/crates/swc_ecma_transforms_base/tests/ts_resolver.rs index 753bc607e74b..4a666bf4e254 100644 --- a/crates/swc_ecma_transforms_base/tests/ts_resolver.rs +++ b/crates/swc_ecma_transforms_base/tests/ts_resolver.rs @@ -89,10 +89,7 @@ impl Visit for AssertNoEmptyCtxt { n.key.visit_with(self); } - n.init.visit_with(self); - n.params.visit_with(self); n.type_ann.visit_with(self); - n.type_params.visit_with(self); } fn visit_ts_setter_signature(&mut self, n: &TsSetterSignature) { diff --git a/crates/swc_ecma_visit/src/lib.rs b/crates/swc_ecma_visit/src/lib.rs index 8287239570df..65d7a545b11d 100644 --- a/crates/swc_ecma_visit/src/lib.rs +++ b/crates/swc_ecma_visit/src/lib.rs @@ -1531,32 +1531,24 @@ define!({ pub key: Box, pub computed: bool, pub optional: bool, - pub init: Option>, - pub params: Vec, pub type_ann: Option>, - pub type_params: Option>, } pub struct TsGetterSignature { pub span: Span, - pub readonly: bool, pub key: Box, pub computed: bool, - pub optional: bool, pub type_ann: Option>, } pub struct TsSetterSignature { pub span: Span, - pub readonly: bool, pub key: Box, pub computed: bool, - pub optional: bool, pub param: TsFnParam, } pub struct TsMethodSignature { pub span: Span, - pub readonly: bool, pub key: Box, pub computed: bool, pub optional: bool, diff --git a/crates/swc_estree_ast/src/typescript.rs b/crates/swc_estree_ast/src/typescript.rs index 3be4a8a1b1f5..d57facfb4d8c 100644 --- a/crates/swc_estree_ast/src/typescript.rs +++ b/crates/swc_estree_ast/src/typescript.rs @@ -289,8 +289,6 @@ pub struct TSPropertySignature { #[serde(default)] pub type_annotation: Option>, #[serde(default)] - pub initializer: Option>, - #[serde(default)] pub computed: Option, #[serde(default)] pub optional: Option, diff --git a/crates/swc_estree_compat/src/babelify/typescript.rs b/crates/swc_estree_compat/src/babelify/typescript.rs index 5d91715521a4..ed4c2d769796 100644 --- a/crates/swc_estree_compat/src/babelify/typescript.rs +++ b/crates/swc_estree_compat/src/babelify/typescript.rs @@ -261,7 +261,6 @@ impl Babelify for TsPropertySignature { type_annotation: self .type_ann .map(|ann| Box::alloc().init(ann.babelify(ctx))), - initializer: self.init.map(|i| Box::alloc().init(i.babelify(ctx).into())), computed: Some(self.computed), optional: Some(self.optional), readonly: Some(self.readonly), From 1b21424c15bca75d4ea8211cf532d125493ea14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Fri, 14 Jun 2024 15:11:09 +0900 Subject: [PATCH 2/2] Update test refd --- .../tests/tsc/1.0lib-noErrors.json | 475 +++--------------- ...tFunctionWithTheSameNameAndCommonRoot.json | 30 +- ...leAndAmbientWithSameNameAndCommonRoot.json | 20 +- ...AmbientClassWithSameNameAndCommonRoot.json | 20 +- ...tFunctionWithTheSameNameAndCommonRoot.json | 20 +- ...assAndModuleWithSameNameAndCommonRoot.json | 5 +- ...AndModuleWithSameNameAndCommonRootES6.json | 5 +- .../tests/tsc/ES5SymbolProperty1.json | 5 +- .../tests/tsc/ES5SymbolProperty4.json | 5 +- .../tests/tsc/ES5SymbolProperty5.json | 5 +- .../tests/tsc/ES5SymbolProperty7.json | 5 +- ...numAndModuleWithSameNameAndCommonRoot.json | 10 +- ...hExtendsInterfaceWithInaccessibleType.json | 11 +- ...lassHeritageListMemberTypeAnnotations.json | 25 +- ...ccessibleTypeInIndexerTypeAnnotations.json | 10 +- ...cessibleTypeInTypeParameterConstraint.json | 25 +- ...bleTypesInNestedMemberTypeAnnotations.json | 30 +- ...bleWithAccessibleTypeInTypeAnnotation.json | 10 +- ...eWithInaccessibleTypeInTypeAnnotation.json | 15 +- ...ionAndModuleWithSameNameAndCommonRoot.json | 40 +- ...uleWithSameNameAndDifferentCommonRoot.json | 20 +- .../tsc/InvalidNonInstantiatedModule.json | 10 +- ...oduleAndEnumWithSameNameAndCommonRoot.json | 10 +- ...duleWithExportedAndNonExportedClasses.json | 10 +- ...WithExportedAndNonExportedImportAlias.json | 55 +- .../swc_ecma_parser/tests/tsc/Protected8.json | 10 +- ...tedAndNonExportedClassesOfTheSameName.json | 15 +- ...AndNonExportedInterfacesOfTheSameName.json | 33 +- ...dAndNonExportedLocalVarsOfTheSameName.json | 30 +- ...chWithExportedInterfacesOfTheSameName.json | 44 +- ...achWithExportedLocalVarsOfTheSameName.json | 10 +- ...eEachWithExportedModulesOfTheSameName.json | 5 +- ...WithTheSameNameAndDifferentCommonRoot.json | 10 +- ...dulesWithTheSameNameAndSameCommonRoot.json | 30 +- .../tests/tsc/accessorsOverrideProperty5.json | 5 +- .../tests/tsc/accessorsOverrideProperty8.json | 5 +- .../tests/tsc/accessorsOverrideProperty9.json | 5 +- .../tsc/allowImportingTypesDtsExtension.json | 5 +- .../ambientDeclarationsPatterns_merging3.json | 10 +- .../tsc/amdImportNotAsPrimaryExpression.json | 20 +- .../tsc/anyAssignabilityInInheritance.json | 20 +- .../tests/tsc/anyAssignableToEveryType.json | 10 +- .../tests/tsc/anyAssignableToEveryType2.json | 105 +--- .../argumentExpressionContextualTyping.json | 25 +- ...arithmeticOperatorWithInvalidOperands.json | 5 +- .../tsc/arityAndOrderCompatibility01.json | 30 +- .../tests/tsc/arrayLiteralInference.json | 5 +- ...rayLiteralWithMultipleBestCommonTypes.json | 70 +-- .../tests/tsc/arrayLiterals.json | 10 +- .../tests/tsc/arrayLiterals3.json | 10 +- .../tests/tsc/arraySpreadInCall.json | 1 - .../tests/tsc/asOperatorAmbiguity.json | 10 +- .../tests/tsc/assignAnyToEveryType.json | 5 +- .../tests/tsc/assignEveryTypeToAny.json | 5 +- .../tsc/assignFromBooleanInterface2.json | 2 - .../tests/tsc/assignFromNumberInterface2.json | 7 - .../tests/tsc/assignFromStringInterface2.json | 33 +- .../assignmentCompatWithCallSignatures2.json | 6 - .../assignmentCompatWithCallSignatures3.json | 45 +- .../assignmentCompatWithCallSignatures4.json | 50 +- .../assignmentCompatWithCallSignatures5.json | 70 +-- .../assignmentCompatWithCallSignatures6.json | 105 +--- ...hCallSignaturesWithOptionalParameters.json | 30 +- ...tWithCallSignaturesWithRestParameters.json | 20 +- ...ignmentCompatWithConstructSignatures2.json | 22 +- ...ignmentCompatWithConstructSignatures3.json | 45 +- ...ignmentCompatWithConstructSignatures4.json | 50 +- ...ignmentCompatWithConstructSignatures5.json | 70 +-- ...ignmentCompatWithConstructSignatures6.json | 105 +--- ...tructSignaturesWithOptionalParameters.json | 30 +- ...ssignmentCompatWithDiscriminatedUnion.json | 385 +++----------- ...gnmentCompatWithGenericCallSignatures.json | 10 +- ...nmentCompatWithGenericCallSignatures4.json | 5 +- .../assignmentCompatWithNumericIndexer.json | 15 +- .../assignmentCompatWithNumericIndexer2.json | 15 +- .../assignmentCompatWithNumericIndexer3.json | 15 +- .../assignmentCompatWithObjectMembers.json | 40 +- .../assignmentCompatWithObjectMembers2.json | 40 +- .../assignmentCompatWithObjectMembers3.json | 40 +- .../assignmentCompatWithObjectMembers4.json | 40 +- .../assignmentCompatWithObjectMembers5.json | 5 +- ...tCompatWithObjectMembersAccessibility.json | 15 +- ...ntCompatWithObjectMembersNumericNames.json | 40 +- ...entCompatWithObjectMembersOptionality.json | 50 +- ...ntCompatWithObjectMembersOptionality2.json | 50 +- ...atWithObjectMembersStringNumericNames.json | 80 +-- .../assignmentCompatWithStringIndexer.json | 15 +- .../assignmentCompatWithStringIndexer2.json | 15 +- .../assignmentCompatWithStringIndexer3.json | 15 +- .../assignmentGenericLookupTypeNarrowing.json | 5 +- .../tests/tsc/assignmentLHSIsReference.json | 5 +- .../assignmentToParenthesizedIdentifiers.json | 5 +- .../tests/tsc/assignmentTypeNarrowing.json | 5 +- ...tedTypeAssignmentCompatIndexSignature.json | 10 +- ...mentedTypeBracketAccessIndexSignature.json | 10 +- .../tsc/awaitBinaryExpression5_es2017.json | 5 +- .../tests/tsc/awaitBinaryExpression5_es5.json | 5 +- .../tests/tsc/awaitBinaryExpression5_es6.json | 5 +- .../tsc/awaitCallExpression1_es2017.json | 2 - .../tests/tsc/awaitCallExpression1_es5.json | 2 - .../tests/tsc/awaitCallExpression1_es6.json | 2 - .../tsc/awaitCallExpression2_es2017.json | 2 - .../tests/tsc/awaitCallExpression2_es5.json | 2 - .../tests/tsc/awaitCallExpression2_es6.json | 2 - .../tsc/awaitCallExpression3_es2017.json | 2 - .../tests/tsc/awaitCallExpression3_es5.json | 2 - .../tests/tsc/awaitCallExpression3_es6.json | 2 - .../tsc/awaitCallExpression4_es2017.json | 2 - .../tests/tsc/awaitCallExpression4_es5.json | 2 - .../tests/tsc/awaitCallExpression4_es6.json | 2 - .../tsc/awaitCallExpression5_es2017.json | 2 - .../tests/tsc/awaitCallExpression5_es5.json | 2 - .../tests/tsc/awaitCallExpression5_es6.json | 2 - .../tsc/awaitCallExpression6_es2017.json | 2 - .../tests/tsc/awaitCallExpression6_es5.json | 2 - .../tests/tsc/awaitCallExpression6_es6.json | 2 - .../tsc/awaitCallExpression7_es2017.json | 2 - .../tests/tsc/awaitCallExpression7_es5.json | 2 - .../tests/tsc/awaitCallExpression7_es6.json | 2 - .../tsc/awaitCallExpression8_es2017.json | 2 - .../tests/tsc/awaitCallExpression8_es5.json | 2 - .../tests/tsc/awaitCallExpression8_es6.json | 2 - ...estCommonTypeOfConditionalExpressions.json | 20 +- .../tests/tsc/bestCommonTypeOfTuple2.json | 5 +- .../tests/tsc/bigintMissingES2019.json | 10 +- .../tests/tsc/bigintMissingES2020.json | 10 +- .../tests/tsc/bigintMissingESNext.json | 10 +- .../tests/tsc/bivariantInferences.json | 1 - .../tests/tsc/booleanLiteralTypes1.json | 20 +- .../tests/tsc/booleanLiteralTypes2.json | 20 +- .../tests/tsc/callChain.2.json | 15 +- .../tests/tsc/callChain.3.json | 6 +- .../swc_ecma_parser/tests/tsc/callChain.json | 15 +- .../tests/tsc/callChainInference.json | 11 +- ...ionWithIncorrectNumberOfTypeArguments.json | 2 - ...lGenericFunctionWithZeroTypeArguments.json | 2 - ...llNonGenericFunctionWithTypeArguments.json | 2 - ...llSignatureAssignabilityInInheritance.json | 50 +- ...lSignatureAssignabilityInInheritance2.json | 225 ++------- ...lSignatureAssignabilityInInheritance3.json | 175 ++----- ...lSignatureAssignabilityInInheritance4.json | 180 ++----- ...lSignatureAssignabilityInInheritance5.json | 190 ++----- ...lSignatureAssignabilityInInheritance6.json | 140 ++---- ...callSignatureWithoutAnnotationsOrBody.json | 2 - ...eWithoutReturnTypeAnnotationInference.json | 15 +- ...SignaturesThatDifferOnlyByReturnType2.json | 1 - ...ithAccessibilityModifiersOnParameters.json | 5 - ...callSignaturesWithDuplicateParameters.json | 5 - .../callSignaturesWithOptionalParameters.json | 2 - ...callSignaturesWithOptionalParameters2.json | 4 - ...ithMissingVoidUndefinedUnknownAnyInJs.json | 1 - .../tests/tsc/callWithSpread.json | 1 - .../tests/tsc/callWithSpread4.json | 20 +- .../tests/tsc/callWithSpreadES6.json | 1 - .../tests/tsc/checkJsdocTypeTag4.json | 5 +- .../tests/tsc/circularImportAlias.json | 5 +- .../tsc/circularIndexedAccessErrors.json | 30 +- ...ircularTypeAliasForUnionWithInterface.json | 5 +- .../tsc/circularTypeofWithVarOrFunc.json | 10 +- ...classAbstractClinterfaceAssignability.json | 15 +- ...ssAndInterfaceMergeConflictingMembers.json | 15 +- .../tsc/classAndInterfaceWithSameName.json | 10 +- .../tsc/classExtendingClassLikeType.json | 10 +- .../classImplementsMergedClassInterface.json | 5 +- .../tests/tsc/classIsSubtypeOfBaseType.json | 25 +- .../tests/tsc/classStaticBlock17.json | 2 - ...nlyPublicMembersEquivalentToInterface.json | 16 +- ...lyPublicMembersEquivalentToInterface2.json | 16 +- .../commonJSImportNotAsPrimaryExpression.json | 20 +- .../tests/tsc/commonTypeIntersection.json | 30 +- ...omparisonOperatorWithIdenticalObjects.json | 2 - ...omparisonOperatorWithIntersectionType.json | 15 +- ...hNoRelationshipObjectsOnCallSignature.json | 13 - ...tionshipObjectsOnConstructorSignature.json | 1 - ...hipObjectsOnInstantiatedCallSignature.json | 12 - ...RelationshipObjectsOnOptionalProperty.json | 10 +- ...eratorWithNoRelationshipTypeParameter.json | 5 +- .../comparisonOperatorWithNumericLiteral.json | 5 +- ...ratorWithSubtypeObjectOnCallSignature.json | 22 - ...typeObjectOnInstantiatedCallSignature.json | 13 - ...orWithSubtypeObjectOnOptionalProperty.json | 15 +- ...AdditionAssignmentLHSCannotBeAssigned.json | 5 +- .../tsc/compoundAssignmentLHSIsReference.json | 5 +- ...xponentiationAssignmentLHSIsReference.json | 5 +- .../tests/tsc/conditionalTypes1.json | 251 ++------- .../tests/tsc/conditionalTypes2.json | 148 ++---- .../tsc/conditionalTypesExcessProperties.json | 15 +- .../tsc/constraintSatisfactionWithAny.json | 10 +- ...constraintSatisfactionWithEmptyObject.json | 10 +- ...ctSignatureAssignabilityInInheritance.json | 50 +- ...tSignatureAssignabilityInInheritance2.json | 225 ++------- ...tSignatureAssignabilityInInheritance3.json | 175 ++----- ...tSignatureAssignabilityInInheritance4.json | 200 ++------ ...tSignatureAssignabilityInInheritance5.json | 190 ++----- ...tSignatureAssignabilityInInheritance6.json | 140 ++---- ...torFunctionTypeIsAssignableToBaseType.json | 15 +- ...orFunctionTypeIsAssignableToBaseType2.json | 15 +- .../tests/tsc/contextualIntersectionType.json | 10 +- .../tests/tsc/contextualThisType.json | 5 +- .../tests/tsc/contextualTypeTupleEnd.json | 10 +- .../tests/tsc/contextualTypeWithTuple.json | 15 +- ...extualTypeWithUnionTypeCallSignatures.json | 5 +- ...xtualTypeWithUnionTypeIndexSignatures.json | 10 +- .../contextualTypeWithUnionTypeMembers.json | 38 +- ...textualTypeWithUnionTypeObjectLiteral.json | 112 +---- ...extuallyTypeAsyncFunctionAwaitOperand.json | 5 +- ...ntextuallyTypeAsyncFunctionReturnType.json | 45 +- .../contextuallyTypedBindingInitializer.json | 21 +- ...tuallyTypedBindingInitializerNegative.json | 21 +- ...pedClassExpressionMethodDeclaration01.json | 12 +- ...pedClassExpressionMethodDeclaration02.json | 12 +- ...TypedObjectLiteralMethodDeclaration01.json | 12 +- .../tests/tsc/controlFlowAliasing.json | 320 +++--------- .../tsc/controlFlowAssignmentExpression.json | 20 +- .../tsc/controlFlowBinaryOrExpression.json | 15 +- .../tests/tsc/controlFlowBindingElement.json | 15 +- .../tsc/controlFlowComputedPropertyNames.json | 15 +- .../tests/tsc/controlFlowDeleteOperator.json | 10 +- .../controlFlowDestructuringDeclaration.json | 45 +- .../tests/tsc/controlFlowElementAccess.json | 5 +- .../tests/tsc/controlFlowElementAccess2.json | 5 +- .../tsc/controlFlowElementAccessNoCrash1.json | 35 +- .../tests/tsc/controlFlowForInStatement2.json | 10 +- .../tests/tsc/controlFlowGenericTypes.json | 100 +--- .../tests/tsc/controlFlowIfStatement.json | 5 +- .../tests/tsc/controlFlowInOperator.json | 10 +- .../controlFlowInstanceofExtendsFunction.json | 1 - .../tsc/controlFlowIterationErrorsAsync.json | 10 +- .../tests/tsc/controlFlowNullishCoalesce.json | 10 +- .../tests/tsc/controlFlowOptionalChain.json | 133 +---- .../tests/tsc/controlFlowOptionalChain2.json | 45 +- .../tests/tsc/controlFlowStringIndex.json | 5 +- .../tsc/controlFlowWithTemplateLiterals.json | 5 +- .../tests/tsc/covariantCallbacks.json | 28 +- ...IdentifierPredicatesWithPrivateName01.json | 5 +- .../tsc/declarationEmitThisPredicates02.json | 15 +- ...onEmitThisPredicatesWithPrivateName02.json | 15 +- .../tests/tsc/declarationFiles.json | 10 +- .../tsc/defaultExportsCannotMerge01.json | 10 +- .../tsc/defaultExportsCannotMerge02.json | 10 +- .../tsc/defaultExportsCannotMerge03.json | 10 +- .../tests/tsc/deleteChain.json | 81 +-- .../tsc/dependentDestructuredVariables.json | 174 ++----- .../tsc/derivedClassOverridesPrivates.json | 30 +- ...derivedClassOverridesProtectedMembers.json | 15 +- ...erivedClassOverridesProtectedMembers2.json | 15 +- ...erivedClassOverridesProtectedMembers3.json | 15 +- ...erivedClassOverridesProtectedMembers4.json | 15 +- .../derivedClassOverridesPublicMembers.json | 15 +- .../derivedClassOverridesWithoutSubtype.json | 20 +- ...dInterfaceIncompatibleWithBaseIndexer.json | 71 +-- ...sHiddenBaseCallViaSuperPropertyAccess.json | 30 +- ...ringArrayBindingPatternAndAssignment2.json | 5 +- .../tests/tsc/destructuringControlFlow.json | 15 +- .../tsc/destructuringInFunctionType.json | 35 +- ...tternAndAssignment9SiblingInitializer.json | 10 +- ...destructuringParameterDeclaration1ES5.json | 74 +-- ...uringParameterDeclaration1ES5iterable.json | 74 +-- ...destructuringParameterDeclaration1ES6.json | 74 +-- .../destructuringParameterDeclaration5.json | 15 +- ...destructuringParameterDeclaration7ES5.json | 10 +- ...uringParameterDeclaration7ES5iterable.json | 10 +- .../destructuringParameterDeclaration8.json | 15 +- .../destructuringVariableDeclaration1ES5.json | 30 +- ...turingVariableDeclaration1ES5iterable.json | 30 +- .../destructuringVariableDeclaration1ES6.json | 30 +- .../destructuringVariableDeclaration2.json | 20 +- .../directDependenceBetweenTypeAliases.json | 10 +- .../tsc/discriminatedUnionInference.json | 30 +- .../tests/tsc/discriminatedUnionTypes1.json | 60 +-- .../tests/tsc/discriminatedUnionTypes2.json | 230 ++------- .../tests/tsc/discriminatedUnionTypes3.json | 20 +- ...duplicatePropertiesInTypeAssertions01.json | 10 +- ...duplicatePropertiesInTypeAssertions02.json | 10 +- .../tests/tsc/elementAccessChain.2.json | 25 +- .../tests/tsc/elementAccessChain.json | 66 +-- .../emitRestParametersFunctionProperty.json | 5 +- ...emitRestParametersFunctionPropertyES6.json | 5 +- .../tests/tsc/enumAssignability.json | 10 +- .../tsc/enumAssignabilityInInheritance.json | 20 +- .../swc_ecma_parser/tests/tsc/enumBasics.json | 15 +- .../enumIsNotASubtypeOfAnythingButNumber.json | 105 +--- .../tests/tsc/enumLiteralTypes1.json | 20 +- .../tests/tsc/enumLiteralTypes2.json | 20 +- .../tsc/equalityWithIntersectionTypes01.json | 15 +- .../tests/tsc/equalityWithUnionTypes01.json | 10 +- .../tests/tsc/everyTypeAssignableToAny.json | 10 +- ...everyTypeWithAnnotationAndInitializer.json | 10 +- ...peWithAnnotationAndInvalidInitializer.json | 10 +- .../tests/tsc/everyTypeWithInitializer.json | 5 +- .../tsc/exhaustiveSwitchStatements1.json | 90 +--- ...nentiationOperatorWithInvalidOperands.json | 5 +- ...xportAssignmentConstrainedGenericType.json | 10 +- .../tsc/exportAssignmentMergedInterface.json | 25 +- .../tests/tsc/exportCodeGen.json | 10 +- .../tests/tsc/exportImportAlias.json | 55 +- .../tests/tsc/exportNonVisibleType.json | 30 +- ...rtTypeMergedWithExportStarAsNamespace.json | 10 +- .../tests/tsc/extendBooleanInterface.json | 2 - .../tests/tsc/extendNumberInterface.json | 2 - .../tests/tsc/extendStringInterface.json | 2 - .../tests/tsc/fluentInterfaces.json | 3 - .../tests/tsc/for-inStatements.json | 5 +- .../tests/tsc/for-inStatementsInvalid.json | 5 +- .../swc_ecma_parser/tests/tsc/for-of29.json | 1 - .../swc_ecma_parser/tests/tsc/for-of58.json | 10 +- .../tests/tsc/forStatements.json | 10 +- .../tsc/forStatementsMultipleInvalidDecl.json | 5 +- .../tsc/forStatementsMultipleValidDecl.json | 30 +- .../tests/tsc/functionCalls.json | 5 +- .../tsc/functionConstraintSatisfaction.json | 5 +- .../tsc/functionConstraintSatisfaction2.json | 5 +- .../tests/tsc/functionImplementations.json | 10 +- .../tests/tsc/functionLiterals.json | 36 +- .../tests/tsc/functionOverloadErrors.json | 5 +- ...functionWithMultipleReturnStatements2.json | 20 +- .../tests/tsc/generatedContextualTyping.json | 216 ++------ .../tsc/generatorReturnContextualType.json | 40 +- .../tests/tsc/generatorTypeCheck62.json | 10 +- .../tests/tsc/generatorTypeCheck63.json | 10 +- .../tests/tsc/generatorTypeCheck7.json | 5 +- .../tsc/generatorYieldContextualType.json | 100 +--- ...AndNonGenericInterfaceWithTheSameName.json | 40 +- ...ndNonGenericInterfaceWithTheSameName2.json | 20 +- ...erloadedMethodWithOverloadedArguments.json | 11 - .../tsc/genericCallTypeArgumentInference.json | 8 - ...lWithConstraintsTypeArgumentInference.json | 8 - ...ricCallWithConstructorTypedArguments5.json | 35 +- ...enericCallWithFunctionTypedArguments5.json | 10 +- ...ericCallWithGenericSignatureArguments.json | 20 +- .../genericCallWithNonSymmetricSubtypes.json | 30 +- .../tsc/genericCallWithObjectLiteralArgs.json | 10 +- .../tsc/genericCallWithObjectTypeArgs2.json | 30 +- ...cCallWithObjectTypeArgsAndConstraints.json | 5 +- ...CallWithObjectTypeArgsAndConstraints2.json | 15 +- ...CallWithObjectTypeArgsAndConstraints3.json | 20 +- .../tests/tsc/genericCallWithTupleType.json | 5 +- ...ClassWithObjectTypeArgsAndConstraints.json | 42 +- .../tests/tsc/genericContextualTypes1.json | 5 +- .../tests/tsc/genericContextualTypes2.json | 35 +- .../tests/tsc/genericContextualTypes3.json | 30 +- .../tests/tsc/genericFunctionParameters.json | 1 - ...nstantiationEquivalentToObjectLiteral.json | 30 +- .../tests/tsc/genericObjectRest.json | 35 +- .../tests/tsc/genericRestParameters1.json | 21 +- .../tests/tsc/genericRestParameters2.json | 10 +- .../tests/tsc/genericRestParameters3.json | 5 +- .../tests/tsc/genericTypeAliases.json | 45 +- .../tests/tsc/ifDoWhileStatements.json | 5 +- ...AnInterfaceExtendingClassWithPrivates.json | 5 +- ...nInterfaceExtendingClassWithPrivates2.json | 15 +- ...InterfaceExtendingClassWithProtecteds.json | 5 +- .../tests/tsc/importAliasIdentifiers.json | 50 +- .../tests/tsc/importStatementsInterfaces.json | 15 +- .../swc_ecma_parser/tests/tsc/importTag1.json | 5 +- .../tests/tsc/importTag13.json | 5 +- .../swc_ecma_parser/tests/tsc/importTag2.json | 5 +- .../swc_ecma_parser/tests/tsc/importTag3.json | 5 +- .../swc_ecma_parser/tests/tsc/importTag4.json | 5 +- .../swc_ecma_parser/tests/tsc/importTag5.json | 5 +- .../swc_ecma_parser/tests/tsc/importTag6.json | 10 +- .../swc_ecma_parser/tests/tsc/importTag7.json | 10 +- .../swc_ecma_parser/tests/tsc/importTag8.json | 10 +- .../swc_ecma_parser/tests/tsc/importTag9.json | 10 +- .../tests/tsc/importTypeAmbient.json | 45 +- .../tests/tsc/importTypeAmbientMissing.json | 10 +- .../tests/tsc/importTypeAmdBundleRewrite.json | 5 +- .../tests/tsc/importTypeGenericTypes.json | 75 +-- .../tests/tsc/importTypeInJSDoc.json | 5 +- .../tests/tsc/importTypeLocal.json | 45 +- .../tests/tsc/importTypeLocalMissing.json | 45 +- .../tsc/inOperatorWithValidOperands.json | 10 +- .../tsc/independentPropertyVariance.json | 20 +- .../tests/tsc/inferFromBindingPattern.json | 20 +- .../tests/tsc/inferTypes2.json | 5 +- .../tests/tsc/inferTypesWithExtends1.json | 230 ++------- .../tests/tsc/inferTypesWithExtends2.json | 20 +- .../tests/tsc/inferingFromAny.json | 20 +- ...infiniteExpansionThroughInstantiation.json | 20 +- ...nfiniteExpansionThroughInstantiation2.json | 5 +- ...infiniteExpansionThroughTypeInference.json | 10 +- ...eofOperatorWithInvalidOperands.es2015.json | 12 +- ...ofOperatorWithRHSHasSymbolHasInstance.json | 55 +- .../tests/tsc/instantiatedModule.json | 30 +- .../interfaceExtendingClassWithPrivates.json | 10 +- .../interfaceExtendingClassWithPrivates2.json | 10 +- ...interfaceExtendingClassWithProtecteds.json | 10 +- ...nterfaceExtendingClassWithProtecteds2.json | 10 +- .../interfaceExtendsObjectIntersection.json | 105 +--- ...erfaceExtendsObjectIntersectionErrors.json | 100 +--- .../tsc/interfaceThatHidesBaseProperty.json | 25 +- .../tsc/interfaceThatHidesBaseProperty2.json | 20 +- ...rfaceThatIndirectlyInheritsFromItself.json | 30 +- ...hCallSignaturesThatHidesBaseSignature.json | 15 +- ...CallSignaturesThatHidesBaseSignature2.json | 15 +- ...tructSignaturesThatHidesBaseSignature.json | 15 +- ...ructSignaturesThatHidesBaseSignature2.json | 15 +- .../tsc/interfaceWithMultipleBaseTypes.json | 120 +---- .../tsc/interfaceWithMultipleBaseTypes2.json | 70 +-- .../tsc/interfaceWithPropertyOfEveryType.json | 75 +-- ...ceWithPropertyThatIsPrivateInBaseType.json | 10 +- ...eWithPropertyThatIsPrivateInBaseType2.json | 2 - ...ithStringIndexerHidingBaseTypeIndexer.json | 40 +- ...thStringIndexerHidingBaseTypeIndexer2.json | 50 +- ...thStringIndexerHidingBaseTypeIndexer3.json | 40 +- .../tests/tsc/intersectionAndUnionTypes.json | 20 +- .../tsc/intersectionAsWeakTypeSource.json | 30 +- ...onIncludingPropFromGlobalAugmentation.json | 10 +- ...rsectionMemberOfUnionNarrowsCorrectly.json | 25 +- .../tsc/intersectionOfUnionNarrowing.json | 40 +- .../tests/tsc/intersectionReduction.json | 180 ++----- .../tsc/intersectionReductionStrict.json | 130 +---- .../tests/tsc/intersectionThisTypes.json | 23 +- .../tests/tsc/intersectionTypeAssignment.json | 30 +- .../tsc/intersectionTypeEquivalence.json | 15 +- .../tests/tsc/intersectionTypeInference.json | 10 +- .../tests/tsc/intersectionTypeInference2.json | 30 +- .../tests/tsc/intersectionTypeInference3.json | 5 +- .../tests/tsc/intersectionTypeMembers.json | 110 +--- .../tests/tsc/intersectionTypeReadonly.json | 25 +- .../tsc/intersectionWithIndexSignatures.json | 60 +-- .../tsc/intersectionsAndEmptyObjects.json | 35 +- .../tests/tsc/intraExpressionInferences.json | 269 ++-------- .../tests/tsc/intrinsicKeyword.json | 5 +- .../tests/tsc/invalidAssignmentsToVoid.json | 5 +- .../tests/tsc/invalidBooleanAssignments.json | 6 +- .../tsc/invalidImportAliasIdentifiers.json | 5 +- .../tests/tsc/invalidInstantiatedModule.json | 10 +- .../invalidMultipleVariableDeclarations.json | 5 +- .../tests/tsc/invalidNumberAssignments.json | 15 +- .../tests/tsc/invalidReturnStatements.json | 5 +- .../tests/tsc/invalidStringAssignments.json | 15 +- .../tsc/invalidUndefinedAssignments.json | 5 +- .../tests/tsc/invalidUndefinedValues.json | 5 +- .../tests/tsc/invalidVoidAssignments.json | 15 +- .../tests/tsc/invalidVoidValues.json | 5 +- .../tsc/isomorphicMappedTypeInference.json | 25 +- .../tsc/jsDeclarationsClassAccessor.json | 10 +- ...sClassImplementsGenericsSerialization.json | 1 - .../tests/tsc/jsDeclarationsClassesErr.json | 55 +- .../tests/tsc/jsDeclarationsInterfaces.json | 105 +--- ...ationsTypeReassignmentFromDeclaration.json | 5 +- ...tionsTypeReassignmentFromDeclaration2.json | 5 +- .../tests/tsc/jsdocImplements_interface.json | 1 - .../jsdocImplements_interface_multiple.json | 2 - .../jsdocImplements_namespacedInterface.json | 2 - .../tests/tsc/jsdocImportType.json | 5 +- .../tests/tsc/jsdocImportType2.json | 5 +- ...ocImportTypeReferenceToCommonjsModule.json | 5 +- .../tests/tsc/jsdocThisType.json | 5 +- .../tests/tsc/jsdocTypeTag.json | 5 +- .../tests/tsc/keyofAndIndexedAccess.json | 275 ++-------- .../tests/tsc/keyofAndIndexedAccess2.json | 70 +-- .../tsc/keyofAndIndexedAccessErrors.json | 15 +- .../tsc/keyofInferenceIntersectsResults.json | 10 +- ...keyofInferenceLowerPriorityThanReturn.json | 20 +- .../tests/tsc/keyofIntersection.json | 10 +- .../tests/tsc/libReferenceNoLib.json | 5 +- .../tests/tsc/libReferenceNoLibBundle.json | 5 +- .../tests/tsc/library-reference-1.json | 1 - .../tests/tsc/library-reference-14.json | 1 - .../tests/tsc/library-reference-15.json | 2 - .../tests/tsc/library-reference-3.json | 1 - .../tests/tsc/library-reference-6.json | 5 +- .../tests/tsc/library-reference-7.json | 1 - .../tests/tsc/library-reference-8.json | 10 +- .../tests/tsc/literalTypeWidening.json | 15 +- .../tests/tsc/literalTypes2.json | 25 +- .../tsc/literalTypesAndDestructuring.json | 10 +- .../tests/tsc/localTypes1.json | 20 +- .../tests/tsc/localTypes4.json | 10 +- .../tests/tsc/logicalAssignment2.json | 21 +- .../tests/tsc/logicalAssignment3.json | 5 +- .../tests/tsc/logicalAssignment4.json | 10 +- .../tests/tsc/logicalAssignment8.json | 5 +- .../tests/tsc/logicalAssignment9.json | 5 +- ...ogicalOrExpressionIsContextuallyTyped.json | 5 +- .../logicalOrOperatorWithTypeParameters.json | 25 +- .../tests/tsc/looseThisTypeInFunctions.json | 7 +- .../tests/tsc/mappedTypeAsClauses.json | 252 ++-------- .../tests/tsc/mappedTypeConstraints.json | 80 +-- .../tests/tsc/mappedTypeConstraints2.json | 40 +- .../tests/tsc/mappedTypeErrors.json | 70 +-- .../tests/tsc/mappedTypeErrors2.json | 10 +- .../mappedTypeIndexSignatureModifiers.json | 5 +- .../tests/tsc/mappedTypeInferenceErrors.json | 10 +- .../tests/tsc/mappedTypeModifiers.json | 130 +---- .../mappedTypeOverlappingStringEnumKeys.json | 25 +- .../tests/tsc/mappedTypeRelationships.json | 50 +- .../tests/tsc/mappedTypeWithAny.json | 10 +- .../tests/tsc/mappedTypes1.json | 15 +- .../tests/tsc/mappedTypes2.json | 72 +-- .../tests/tsc/mappedTypes3.json | 20 +- .../tests/tsc/mappedTypes4.json | 70 +-- .../tests/tsc/mappedTypes5.json | 50 +- .../tests/tsc/mappedTypes6.json | 30 +- .../tests/tsc/mappedTypesAndObjects.json | 40 +- .../tests/tsc/mappedTypesArraysTuples.json | 35 +- .../tests/tsc/mappedTypesGenericTuples.json | 20 +- .../tests/tsc/mergeThreeInterfaces.json | 60 +-- .../tests/tsc/mergeThreeInterfaces2.json | 30 +- .../tests/tsc/mergeTwoInterfaces.json | 45 +- .../tests/tsc/mergeTwoInterfaces2.json | 20 +- .../tests/tsc/mergedClassInterface.json | 15 +- .../tsc/mergedInheritedClassInterface.json | 20 +- ...edInheritedMembersSatisfyAbstractBase.json | 10 +- ...nterfacesWithConflictingPropertyNames.json | 40 +- ...terfacesWithConflictingPropertyNames2.json | 40 +- .../tsc/mergedInterfacesWithIndexers.json | 5 +- .../tsc/mergedInterfacesWithIndexers2.json | 25 +- ...mergedInterfacesWithInheritedPrivates.json | 10 +- ...ergedInterfacesWithInheritedPrivates2.json | 10 +- ...ergedInterfacesWithInheritedPrivates3.json | 20 +- .../mergedInterfacesWithMultipleBases.json | 20 +- .../mergedInterfacesWithMultipleBases2.json | 20 +- .../mergedInterfacesWithMultipleBases3.json | 10 +- .../mergedInterfacesWithMultipleBases4.json | 10 +- .../tsc/methodSignaturesWithOverloads.json | 14 +- .../tsc/methodSignaturesWithOverloads2.json | 14 +- .../tests/tsc/mixinAbstractClasses.json | 1 - ...xinAbstractClassesReturnTypeInference.json | 1 - .../tests/tsc/mixinAccessModifiers.json | 30 +- .../tests/tsc/mixinClassesAnnotated.json | 11 +- .../tests/tsc/moduleExportAlias2.json | 5 +- ...uleExportWithExportPropertyAssignment.json | 5 +- ...leExportWithExportPropertyAssignment2.json | 5 +- ...leExportWithExportPropertyAssignment3.json | 5 +- ...leExportWithExportPropertyAssignment4.json | 5 +- .../tsc/moduleWithStatementsOfEveryKind.json | 10 +- .../tests/tsc/nameCollision.json | 5 +- .../narrowExceptionVariableInCatchClause.json | 6 +- .../tsc/narrowingConstrainedTypeVariable.json | 10 +- .../tests/tsc/nestedModules.json | 30 +- .../tests/tsc/neverInference.json | 20 +- .../tsc/neverIntersectionNotCallable.json | 10 +- .../tests/tsc/neverReturningFunctions1.json | 77 +-- .../tests/tsc/neverTypeErrors1.json | 15 +- .../tests/tsc/neverTypeErrors2.json | 15 +- .../tests/tsc/neverUnionIntersection.json | 10 +- .../tests/tsc/newWithSpread.json | 15 +- .../tests/tsc/newWithSpreadES5.json | 15 +- .../tests/tsc/newWithSpreadES6.json | 15 +- crates/swc_ecma_parser/tests/tsc/noInfer.json | 50 +- .../noPropertyAccessFromIndexSignature1.json | 10 +- .../tests/tsc/noUncheckedIndexedAccess.json | 35 +- ...noUncheckedIndexedAccessDestructuring.json | 10 +- .../nominalSubtypeCheckOfTypeParameter.json | 15 +- .../nominalSubtypeCheckOfTypeParameter2.json | 25 +- .../tests/tsc/nonInstantiatedModule.json | 51 +- .../tests/tsc/nonPrimitiveAndEmptyObject.json | 10 +- .../tsc/nonPrimitiveAndTypeVariables.json | 10 +- .../tests/tsc/nonPrimitiveAsProperty.json | 5 +- ...nPrimitiveConstraintOfIndexAccessType.json | 5 +- .../tests/tsc/nonPrimitiveInGeneric.json | 5 +- .../tsc/nonPrimitiveUnionIntersection.json | 5 +- .../tests/tsc/nullAssignableToEveryType.json | 10 +- ...nullIsSubtypeOfEverythingButUndefined.json | 5 +- .../tests/tsc/nullishCoalescingOperator1.json | 5 +- .../tsc/nullishCoalescingOperator12.json | 5 +- .../tests/tsc/nullishCoalescingOperator8.json | 12 +- ...ishCoalescingOperatorInAsyncGenerator.json | 5 +- ...IndexerConstrainsPropertyDeclarations.json | 107 +--- ...ndexerConstrainsPropertyDeclarations2.json | 50 +- .../tests/tsc/numericIndexingResults.json | 30 +- .../tests/tsc/numericLiteralTypes1.json | 30 +- .../tests/tsc/numericLiteralTypes2.json | 30 +- .../tests/tsc/numericStringLiteralTypes.json | 5 +- .../tsc/objectLiteralContextualTyping.json | 15 +- .../tests/tsc/objectLiteralNormalization.json | 50 +- ...tLiteralShorthandPropertiesAssignment.json | 40 +- ...teralShorthandPropertiesAssignmentES6.json | 40 +- ...ralShorthandPropertiesAssignmentError.json | 40 +- ...sAssignmentErrorFromMissingIdentifier.json | 50 +- ...alShorthandPropertiesFunctionArgument.json | 10 +- ...lShorthandPropertiesFunctionArgument2.json | 10 +- .../swc_ecma_parser/tests/tsc/objectRest.json | 76 +-- .../tests/tsc/objectRestAssignment.json | 70 +-- .../tests/tsc/objectRestForOf.json | 15 +- .../tests/tsc/objectRestNegative.json | 30 +- .../tests/tsc/objectRestParameter.json | 50 +- .../tests/tsc/objectRestParameterES5.json | 50 +- .../tests/tsc/objectRestReadonly.json | 15 +- .../tests/tsc/objectSpread.json | 361 +++---------- .../tests/tsc/objectSpreadIndexSignature.json | 10 +- .../objectSpreadRepeatedNullCheckPerf.json | 130 +---- .../tsc/objectSpreadSetonlyAccessor.json | 15 +- .../tests/tsc/objectSpreadStrictNull.json | 95 +--- ...jectTypeHidingMembersOfExtendedObject.json | 17 +- .../tsc/objectTypeHidingMembersOfObject.json | 2 - ...HidingMembersOfObjectAssignmentCompat.json | 1 - ...idingMembersOfObjectAssignmentCompat2.json | 1 - .../tests/tsc/objectTypeLiteralSyntax.json | 20 +- .../tests/tsc/objectTypePropertyAccess.json | 5 +- ...natureHidingMembersOfExtendedFunction.json | 9 +- ...hCallSignatureHidingMembersOfFunction.json | 4 - ...natureHidingMembersOfExtendedFunction.json | 9 +- ...tructSignatureHidingMembersOfFunction.json | 4 - .../tsc/objectTypeWithNumericProperty.json | 20 +- ...ithStringAndNumberIndexSignatureToAny.json | 10 +- ...eWithStringIndexerHidingObjectIndexer.json | 10 +- ...tringNamedPropertyOfIllegalCharacters.json | 30 +- .../tests/tsc/objectTypesIdentity.json | 10 +- .../tests/tsc/objectTypesIdentity2.json | 10 +- ...objectTypesIdentityWithCallSignatures.json | 3 - ...bjectTypesIdentityWithCallSignatures2.json | 3 - ...ithCallSignaturesDifferingParamCounts.json | 3 - ...entityWithCallSignaturesWithOverloads.json | 7 - ...ypesIdentityWithGenericCallSignatures.json | 3 - ...pesIdentityWithGenericCallSignatures2.json | 3 - ...cCallSignaturesDifferingByConstraints.json | 3 - ...CallSignaturesDifferingByConstraints2.json | 3 - ...CallSignaturesDifferingByConstraints3.json | 18 +- ...icCallSignaturesDifferingByReturnType.json | 3 - ...cCallSignaturesDifferingByReturnType2.json | 3 - ...ignaturesDifferingTypeParameterCounts.json | 3 - ...SignaturesDifferingTypeParameterNames.json | 3 - ...thGenericCallSignaturesOptionalParams.json | 3 - ...hGenericCallSignaturesOptionalParams2.json | 3 - ...hGenericCallSignaturesOptionalParams3.json | 3 - ...ructSignaturesDifferingByConstraints3.json | 15 +- .../objectTypesIdentityWithOptionality.json | 10 +- .../tsc/objectTypesIdentityWithPrivates.json | 10 +- .../tsc/objectTypesIdentityWithPrivates3.json | 5 +- .../tsc/objectTypesIdentityWithPublics.json | 10 +- .../tsc/operatorsAndIntersectionTypes.json | 10 +- .../tests/tsc/optionalBindingParameters2.json | 15 +- ...optionalBindingParametersInOverloads2.json | 15 +- ...alChainingInParameterBindingPattern.2.json | 5 +- ...onalChainingInParameterBindingPattern.json | 5 +- ...ionalChainingInParameterInitializer.2.json | 5 +- ...ptionalChainingInParameterInitializer.json | 5 +- .../tests/tsc/optionalChainingInference.json | 20 +- .../tests/tsc/optionalMethods.json | 12 +- .../tests/tsc/optionalProperties01.json | 15 +- .../tests/tsc/optionalProperties02.json | 10 +- ...pertyAssignableToStringIndexSignature.json | 25 +- .../swc_ecma_parser/tests/tsc/override19.json | 5 +- .../swc_ecma_parser/tests/tsc/override20.json | 3 - .../tests/tsc/overrideInterfaceProperty.json | 10 +- .../tsc/parametersWithNoAnnotationAreAny.json | 3 - .../tests/tsc/parentheses.json | 20 +- .../tsc/parenthesizedContexualTyping1.json | 10 +- .../tsc/parenthesizedContexualTyping2.json | 10 +- .../tests/tsc/parser509677.json | 5 +- .../tests/tsc/parser643728.json | 10 +- .../tests/tsc/parser645484.json | 1 - .../tests/tsc/parserAstSpans1.json | 110 +--- .../tests/tsc/parserClassDeclaration25.json | 2 - .../tsc/parserCommaInTypeMemberList1.json | 10 +- .../tsc/parserCommaInTypeMemberList2.json | 15 +- .../tests/tsc/parserES5SymbolProperty1.json | 5 +- .../tests/tsc/parserES5SymbolProperty2.json | 1 - .../tests/tsc/parserES5SymbolProperty8.json | 1 - .../tests/tsc/parserES5SymbolProperty9.json | 5 +- ...rorRecovery_IncompleteMemberVariable1.json | 1 - .../tsc/parserExportAsFunctionIdentifier.json | 1 - ...parserGenericsInInterfaceDeclaration1.json | 7 +- .../tsc/parserInterfaceDeclaration9.json | 12 - .../tests/tsc/parserMethodSignature1.json | 1 - .../tests/tsc/parserMethodSignature10.json | 1 - .../tests/tsc/parserMethodSignature11.json | 1 - .../tests/tsc/parserMethodSignature12.json | 1 - .../tests/tsc/parserMethodSignature2.json | 1 - .../tests/tsc/parserMethodSignature3.json | 1 - .../tests/tsc/parserMethodSignature4.json | 1 - .../tests/tsc/parserMethodSignature5.json | 1 - .../tests/tsc/parserMethodSignature6.json | 1 - .../tests/tsc/parserMethodSignature7.json | 1 - .../tests/tsc/parserMethodSignature8.json | 1 - .../tests/tsc/parserMethodSignature9.json | 1 - .../parserModifierOnPropertySignature2.json | 10 +- .../tests/tsc/parserModule1.json | 1 - .../tests/tsc/parserObjectType2.json | 5 +- .../tests/tsc/parserObjectType3.json | 10 +- .../tests/tsc/parserObjectType4.json | 10 +- .../tests/tsc/parserOptionalTypeMembers1.json | 22 +- .../tests/tsc/parserOverloadOnConstants1.json | 4 - .../tests/tsc/parserPropertySignature1.json | 5 +- .../tests/tsc/parserPropertySignature10.json | 5 +- .../tests/tsc/parserPropertySignature11.json | 5 +- .../tests/tsc/parserPropertySignature12.json | 5 +- .../tests/tsc/parserPropertySignature2.json | 5 +- .../tests/tsc/parserPropertySignature3.json | 5 +- .../tests/tsc/parserPropertySignature4.json | 5 +- .../tests/tsc/parserPropertySignature5.json | 5 +- .../tests/tsc/parserPropertySignature6.json | 5 +- .../tests/tsc/parserPropertySignature7.json | 5 +- .../tests/tsc/parserPropertySignature8.json | 5 +- .../tests/tsc/parserPropertySignature9.json | 5 +- .../tests/tsc/parserRealSource1.json | 7 - .../tests/tsc/parserRealSource12.json | 11 +- .../tests/tsc/parserRealSource13.json | 107 ---- .../tests/tsc/parserSymbolProperty1.json | 5 +- .../tests/tsc/parserSymbolProperty2.json | 1 - .../tests/tsc/parserSymbolProperty8.json | 1 - .../tests/tsc/parserSymbolProperty9.json | 5 +- .../tests/tsc/partiallyNamedTuples.json | 15 +- .../tests/tsc/partiallyNamedTuples2.json | 1 - .../tsc/privateNameConstructorSignature.json | 5 +- .../tsc/privateWriteOnlyAccessorRead.json | 10 +- .../tests/tsc/propertyAccess.json | 5 +- .../tests/tsc/propertyAccessChain.2.json | 25 +- .../tests/tsc/propertyAccessChain.json | 66 +-- ...yAccessOnTypeParameterWithConstraints.json | 5 +- ...AccessOnTypeParameterWithConstraints2.json | 5 +- ...AccessOnTypeParameterWithConstraints3.json | 5 +- ...AccessOnTypeParameterWithConstraints4.json | 5 +- ...AccessOnTypeParameterWithConstraints5.json | 5 +- ...cessOnTypeParameterWithoutConstraints.json | 5 +- .../tests/tsc/propertyAccessWidening.json | 10 +- .../tsc/propertyAssignmentUseParentType1.json | 10 +- .../tsc/propertyAssignmentUseParentType3.json | 5 +- .../propertyNameWithoutTypeAnnotation.json | 10 +- ...rtyAssignmentMergeWithInterfaceMethod.json | 6 - ...ecurringTypeParamForContainerOfBase01.json | 15 +- .../tests/tsc/recursiveIntersectionTypes.json | 15 +- .../tests/tsc/recursiveMappedTypes.json | 40 +- .../tests/tsc/recursiveTypeReferences1.json | 10 +- .../tests/tsc/recursiveTypesWithTypeof.json | 20 +- .../tests/tsc/returnStatements.json | 5 +- crates/swc_ecma_parser/tests/tsc/seeTag1.json | 10 +- .../tests/tsc/shadowedInternalModule.json | 20 +- ...IsNotSubtypeOfNonSpecializedSignature.json | 12 - ...ureIsSubtypeOfNonSpecializedSignature.json | 18 - .../spreadContextualTypedBindingPattern.json | 10 +- .../tests/tsc/spreadDuplicate.json | 20 +- .../tests/tsc/spreadDuplicateExact.json | 20 +- .../tests/tsc/spreadExcessProperty.json | 10 +- .../tests/tsc/spreadMethods.json | 11 +- .../tests/tsc/spreadNonPrimitive.json | 10 +- .../tests/tsc/spreadObjectOrFalsy.json | 10 +- .../tests/tsc/spreadOverwritesProperty.json | 30 +- .../tsc/spreadOverwritesPropertyStrict.json | 70 +-- .../tests/tsc/spreadUnion.json | 55 +- .../tests/tsc/spreadUnion2.json | 50 +- .../tests/tsc/spreadUnion3.json | 15 +- .../tests/tsc/spreadUnion4.json | 10 +- .../tests/tsc/strictBindCallApply2.json | 5 +- .../tsc/stringEnumInElementAccess01.json | 15 +- .../tests/tsc/stringEnumLiteralTypes1.json | 20 +- .../tests/tsc/stringEnumLiteralTypes2.json | 20 +- ...IndexerConstrainsPropertyDeclarations.json | 107 +--- ...ndexerConstrainsPropertyDeclarations2.json | 40 +- .../tests/tsc/stringIndexingResults.json | 10 +- .../stringLiteralTypeIsSubtypeOfString.json | 5 +- .../tests/tsc/stringLiteralTypesAsTags01.json | 25 +- .../tests/tsc/stringLiteralTypesAsTags02.json | 25 +- .../tests/tsc/stringLiteralTypesAsTags03.json | 25 +- ...iteralTypesInImplementationSignatures.json | 2 - ...teralTypesInImplementationSignatures2.json | 4 - .../tsc/stringLiteralTypesOverloads03.json | 25 +- .../tsc/stringLiteralTypesOverloads05.json | 20 +- ...ralsAssertionsInEqualityComparisons02.json | 5 +- .../stringLiteralsWithEqualityChecks03.json | 10 +- .../stringLiteralsWithEqualityChecks04.json | 10 +- .../tests/tsc/stringMappingReduction.json | 6 +- .../tests/tsc/stringNamedPropertyAccess.json | 10 +- .../tests/tsc/subtypesOfAny.json | 105 +--- .../tests/tsc/subtypesOfTypeParameter.json | 5 +- ...btypesOfTypeParameterWithConstraints2.json | 10 +- .../tests/tsc/subtypesOfUnion.json | 190 ++----- .../tsc/subtypingWithCallSignatures2.json | 70 +-- .../tsc/subtypingWithCallSignatures3.json | 75 +-- .../tsc/subtypingWithCallSignatures4.json | 105 +--- ...hCallSignaturesWithOptionalParameters.json | 115 +---- ...gWithCallSignaturesWithRestParameters.json | 170 ++----- ...llSignaturesWithSpecializedSignatures.json | 50 +- .../subtypingWithConstructSignatures2.json | 70 +-- .../subtypingWithConstructSignatures3.json | 75 +-- .../subtypingWithConstructSignatures4.json | 105 +--- .../subtypingWithConstructSignatures5.json | 190 ++----- .../subtypingWithConstructSignatures6.json | 140 ++---- ...tructSignaturesWithOptionalParameters.json | 115 +---- ...ctSignaturesWithSpecializedSignatures.json | 50 +- ...cCallSignaturesWithOptionalParameters.json | 345 +++---------- ...tructSignaturesWithOptionalParameters.json | 345 +++---------- .../tsc/subtypingWithNumericIndexer.json | 15 +- .../tsc/subtypingWithNumericIndexer2.json | 15 +- .../tsc/subtypingWithNumericIndexer3.json | 15 +- .../tsc/subtypingWithNumericIndexer4.json | 15 +- .../tsc/subtypingWithNumericIndexer5.json | 15 +- .../tsc/subtypingWithObjectMembers2.json | 130 +---- .../tsc/subtypingWithObjectMembers3.json | 130 +---- .../tsc/subtypingWithObjectMembers5.json | 40 +- ...subtypingWithObjectMembersOptionality.json | 85 +--- ...ubtypingWithObjectMembersOptionality2.json | 50 +- ...ubtypingWithObjectMembersOptionality3.json | 50 +- ...ubtypingWithObjectMembersOptionality4.json | 50 +- .../tsc/subtypingWithOptionalProperties.json | 5 +- .../tests/tsc/subtypingWithStringIndexer.json | 15 +- .../tsc/subtypingWithStringIndexer2.json | 15 +- .../tsc/subtypingWithStringIndexer3.json | 15 +- .../tsc/subtypingWithStringIndexer4.json | 15 +- .../superCallParameterContextualTyping3.json | 1 - .../tests/tsc/symbolDeclarationEmit5.json | 1 - .../tests/tsc/symbolDeclarationEmit6.json | 5 +- .../tests/tsc/symbolDeclarationEmit7.json | 5 +- .../tests/tsc/symbolProperty10.json | 20 +- .../tests/tsc/symbolProperty11.json | 10 +- .../tests/tsc/symbolProperty12.json | 15 +- .../tests/tsc/symbolProperty13.json | 20 +- .../tests/tsc/symbolProperty14.json | 20 +- .../tests/tsc/symbolProperty15.json | 10 +- .../tests/tsc/symbolProperty16.json | 15 +- .../tests/tsc/symbolProperty17.json | 10 +- .../tests/tsc/symbolProperty20.json | 6 +- .../tests/tsc/symbolProperty21.json | 20 +- .../tests/tsc/symbolProperty22.json | 1 - .../tests/tsc/symbolProperty23.json | 5 +- .../tests/tsc/symbolProperty24.json | 5 +- .../tests/tsc/symbolProperty25.json | 5 +- .../tests/tsc/symbolProperty29.json | 5 +- .../tests/tsc/symbolProperty30.json | 5 +- .../tests/tsc/symbolProperty31.json | 5 +- .../tests/tsc/symbolProperty32.json | 5 +- .../tests/tsc/symbolProperty33.json | 5 +- .../tests/tsc/symbolProperty34.json | 5 +- .../tests/tsc/symbolProperty35.json | 12 +- .../tests/tsc/symbolProperty37.json | 10 +- .../tests/tsc/symbolProperty38.json | 10 +- .../tests/tsc/symbolProperty41.json | 15 +- .../tests/tsc/symbolProperty58.json | 5 +- .../tests/tsc/symbolProperty60.json | 20 +- .../tests/tsc/symbolProperty61.json | 11 +- .../tests/tsc/symbolProperty8.json | 6 +- .../tests/tsc/symbolProperty9.json | 20 +- .../tests/tsc/symbolType16.json | 5 +- .../tests/tsc/symbolType17.json | 5 +- .../tests/tsc/symbolType18.json | 5 +- ...dTemplateStringsTypeArgumentInference.json | 25 +- ...mplateStringsTypeArgumentInferenceES6.json | 25 +- ...plateStringsWithIncompatibleTypedTags.json | 16 +- ...teStringsWithIncompatibleTypedTagsES6.json | 16 +- ...ringsWithManyCallAndMemberExpressions.json | 5 +- ...gsWithManyCallAndMemberExpressionsES6.json | 5 +- .../taggedTemplateStringsWithTypedTags.json | 16 +- ...taggedTemplateStringsWithTypedTagsES6.json | 16 +- .../taggedTemplatesWithTypeArguments1.json | 25 +- .../tests/tsc/templateLiteralTypes2.json | 5 +- .../tests/tsc/templateLiteralTypes3.json | 40 +- .../tests/tsc/templateLiteralTypes4.json | 49 +- .../tests/tsc/templateLiteralTypes5.json | 10 +- .../tests/tsc/templateLiteralTypes6.json | 20 +- .../tests/tsc/templateLiteralTypes7.json | 20 +- .../tsc/templateLiteralTypesPatterns.json | 5 +- .../tests/tsc/thisInObjectLiterals.json | 15 +- .../tests/tsc/thisTypeAccessibility.json | 3 - .../tests/tsc/thisTypeErrors.json | 42 +- .../tests/tsc/thisTypeInAccessors.json | 10 +- .../tsc/thisTypeInAccessorsNegative.json | 15 +- ...sePropertyAndDerivedContainerOfBase01.json | 15 +- .../tests/tsc/thisTypeInClasses.json | 10 +- .../tests/tsc/thisTypeInFunctions.json | 114 +---- .../tests/tsc/thisTypeInFunctions2.json | 22 +- .../tests/tsc/thisTypeInFunctions4.json | 10 +- .../tests/tsc/thisTypeInInterfaces.json | 66 +-- .../tests/tsc/thisTypeInObjectLiterals.json | 8 +- .../tests/tsc/thisTypeInObjectLiterals2.json | 60 +-- .../tests/tsc/thisTypeInTuples.json | 1 - .../tests/tsc/thisTypeSyntacticContext.json | 20 +- .../tests/tsc/throwStatements.json | 5 +- .../tests/tsc/tsNoCheckForTypescript.json | 5 +- .../tsc/tsNoCheckForTypescriptComments1.json | 5 +- .../tsc/tsNoCheckForTypescriptComments2.json | 5 +- ...nterfacesDifferingByTypeParameterName.json | 60 +-- ...terfacesDifferingByTypeParameterName2.json | 40 +- ...ricInterfacesWithDifferentConstraints.json | 70 +-- ...facesWithTheSameNameButDifferentArity.json | 40 +- .../tsc/twoInterfacesDifferentRootModule.json | 20 +- .../twoInterfacesDifferentRootModule2.json | 20 +- ...ergedInterfacesWithDifferingOverloads.json | 22 +- .../tests/tsc/typeAliases.json | 20 +- .../tests/tsc/typeAliasesForObjectTypes.json | 25 +- .../tests/tsc/typeArgumentInference.json | 45 +- ...eArgumentInferenceConstructSignatures.json | 45 +- .../typeArgumentInferenceWithConstraints.json | 45 +- ...ypeArgumentInferenceWithObjectLiteral.json | 12 +- ...typeAssertionsWithIntersectionTypes01.json | 15 +- .../tsc/typeAssertionsWithUnionTypes01.json | 10 +- .../typeFromPrivatePropertyAssignment.json | 5 +- .../tsc/typeFromPropertyAssignment30.json | 5 +- .../tests/tsc/typeGuardFunction.json | 1 - .../tsc/typeGuardFunctionOfFormThis.json | 24 +- .../tests/tsc/typeGuardIntersectionTypes.json | 45 +- ...typeGuardNarrowsPrimitiveIntersection.json | 5 +- .../typeGuardOfFormInstanceOfOnInterface.json | 30 +- .../typeGuardOfFormIsTypeOnInterfaces.json | 30 +- .../tsc/typeGuardOfFormTypeOfFunction.json | 20 +- ...typeGuardOfFormTypeOfPrimitiveSubtype.json | 1 - .../typeGuardOfFromPropNameInUnionType.json | 10 +- .../tests/tsc/typeGuardsAsAssertions.json | 10 +- .../tests/tsc/typeGuardsInProperties.json | 5 +- .../tests/tsc/typeGuardsOnClassProperty.json | 10 +- .../tests/tsc/typeGuardsWithInstanceOf.json | 7 +- ...sWithInstanceOfByConstructorSignature.json | 100 +--- ...ardsWithInstanceOfBySymbolHasInstance.json | 108 +--- ...tanceMemberNarrowedWithLoopAntecedent.json | 20 +- .../tsc/typeParameterAsTypeArgument.json | 5 +- ...ypeParameterAsTypeParameterConstraint.json | 15 +- ...peParameterAsTypeParameterConstraint2.json | 10 +- ...AsTypeParameterConstraintTransitively.json | 15 +- ...sTypeParameterConstraintTransitively2.json | 15 +- ...rameterConstModifiersWithIntersection.json | 25 +- ...rameterUsedAsTypeParameterConstraint3.json | 32 +- ...rameterUsedAsTypeParameterConstraint4.json | 16 +- ...ypeParametersAreIdenticalToThemselves.json | 14 - .../tests/tsc/typePredicateASI.json | 2 - .../tests/tsc/typeQueryWithReservedWords.json | 15 +- .../typeSatisfaction_contextualTyping2.json | 3 - .../typeSatisfaction_ensureInterfaceImpl.json | 1 - ...atisfaction_optionalMemberConformance.json | 10 +- ...atisfaction_propertyValueConformance1.json | 5 +- ...atisfaction_propertyValueConformance2.json | 5 +- ...atisfaction_propertyValueConformance3.json | 15 +- ..._vacuousIntersectionOfContextualTypes.json | 10 +- .../tests/tsc/typedefCrossModule.json | 5 +- .../tsc/typedefMultipleTypeParameters.json | 15 +- .../tests/tsc/typeofANonExportedType.json | 5 +- .../tests/tsc/typeofAnExportedType.json | 5 +- .../swc_ecma_parser/tests/tsc/typeofThis.json | 20 +- .../tsc/types.asyncGenerators.es2018.1.json | 1 - ...pesOnlyExternalModuleStillHasInstance.json | 20 +- .../tests/tsc/typesWithOptionalProperty.json | 22 +- .../typesWithSpecializedCallSignatures.json | 6 - .../tsc/undefinedAssignableToEveryType.json | 10 +- .../tsc/undefinedIsSubtypeOfEverything.json | 10 +- .../tsc/unionAndIntersectionInference1.json | 30 +- .../tsc/unionAndIntersectionInference2.json | 35 +- .../tsc/unionAndIntersectionInference3.json | 29 +- ...ubtypeIfEveryConstituentTypeIsSubtype.json | 195 ++----- .../tests/tsc/unionThisTypeInFunctions.json | 12 +- .../tests/tsc/unionTypeCallSignatures6.json | 50 +- .../tests/tsc/unionTypeFromArrayLiteral.json | 10 +- .../tests/tsc/unionTypeInference.json | 12 +- .../tests/tsc/unionTypeMembers.json | 42 +- .../tests/tsc/unionTypeReadonly.json | 25 +- .../tests/tsc/unionTypeReduction2.json | 9 - .../tsc/unionTypeWithIndexSignature.json | 60 +-- .../tests/tsc/uniqueSymbols.json | 36 +- .../tests/tsc/uniqueSymbolsDeclarations.json | 35 +- .../tsc/uniqueSymbolsDeclarationsErrors.json | 18 +- .../tests/tsc/unknownControlFlow.json | 40 +- .../tests/tsc/unknownType1.json | 5 +- .../tests/tsc/unknownType2.json | 30 +- .../validMultipleVariableDeclarations.json | 30 +- .../tests/tsc/validNullAssignments.json | 6 +- .../tests/tsc/validUndefinedAssignments.json | 6 +- .../tests/tsc/varRequireFromTypescript.json | 5 +- .../tests/tsc/variadicTuples1.json | 21 +- .../swc_ecma_parser/tests/tsc/variance.json | 5 +- .../tsc/voidParamAssignmentCompatibility.json | 1 - .../tests/tsc/weakTypesAndLiterals01.json | 12 +- crates/swc_ecma_parser/tests/tsc/witness.json | 5 +- .../tsc/wrappedAndRecursiveConstraints.json | 5 +- .../tsc/wrappedAndRecursiveConstraints3.json | 5 +- .../tsc/wrappedAndRecursiveConstraints4.json | 5 +- .../typescript/class/generic/input.ts.json | 5 +- .../custom/issue-196-01/input.ts.json | 10 +- .../custom/issue-196-02/input.ts.json | 10 +- .../custom/issue-709-3/input.ts.json | 5 +- .../custom/issue-709/input.d.ts.json | 15 +- .../declare/destructure/input.ts.json | 10 +- .../typescript/deno/dso/reflect/input.ts.json | 85 +--- .../es2019/from-entries/input.ts.json | 2 - .../interface/generic/input.ts.json | 5 +- .../interface/method-computed/input.ts.json | 2 - .../interface/method-generic/input.ts.json | 6 +- .../interface/method-optional/input.ts.json | 1 - .../interface/method-plain/input.ts.json | 2 - .../interface/modifiers/input.ts.json | 5 +- .../interface/properties/input.ts.json | 15 +- .../interface/property-computed/input.ts.json | 10 +- .../property-named-public/input.ts.json | 5 +- .../reserved-method-name/input.ts.json | 1 - .../interface/separators/input.ts.json | 30 +- .../typescript/issue-1517/case1/input.ts.json | 4 - .../typescript/issue-1517/case2/input.ts.json | 4 - .../typescript/issue-2160/case1/input.ts.json | 5 +- .../typescript/issue-2160/case2/input.ts.json | 5 +- .../issue-2161/case1/input.tsx.json | 5 +- .../typescript/issue-4296/1/input.tsx.json | 5 +- .../typescript/issue-7186/1/input.ts.json | 1 - .../typescript/issue-7186/2/input.tsx.json | 1 - .../tests/typescript/issue-913/input.ts.json | 5 +- .../type-alias/generic-complex/input.ts.json | 5 +- .../basic/input.ts.json | 20 +- .../types/object-shorthand/input.ts.json | 5 +- .../types/type-literal/input.ts.json | 5 +- .../variance-annotations/1/input.ts.json | 145 ++---- .../with_jsx/input.tsx.json | 145 ++---- 990 files changed, 5003 insertions(+), 21074 deletions(-) diff --git a/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json b/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json index 1be8b5481d38..c3cf566dc15d 100644 --- a/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json @@ -927,8 +927,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -945,8 +943,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -968,8 +965,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -986,8 +981,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1009,8 +1003,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1027,8 +1019,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1050,8 +1041,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1068,8 +1057,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -1078,7 +1066,6 @@ "end": 3138, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1118,7 +1105,6 @@ "end": 3162, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1327,8 +1313,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1355,8 +1339,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -1365,7 +1348,6 @@ "end": 3473, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1405,7 +1387,6 @@ "end": 3578, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1445,7 +1426,6 @@ "end": 3666, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1495,7 +1475,6 @@ "end": 3836, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1563,7 +1542,6 @@ "end": 4047, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1641,7 +1619,6 @@ "end": 4209, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1913,8 +1890,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1941,8 +1916,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -1951,7 +1925,6 @@ "end": 4615, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2019,7 +1992,6 @@ "end": 4990, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2124,7 +2096,6 @@ "end": 5389, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2200,7 +2171,6 @@ "end": 5732, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2305,7 +2275,6 @@ "end": 6233, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2437,7 +2406,6 @@ "end": 6709, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2542,7 +2510,6 @@ "end": 6925, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2610,7 +2577,6 @@ "end": 7148, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2678,7 +2644,6 @@ "end": 7313, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2746,7 +2711,6 @@ "end": 7531, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2814,7 +2778,6 @@ "end": 7762, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2882,7 +2845,6 @@ "end": 7938, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2950,7 +2912,6 @@ "end": 8221, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3063,7 +3024,6 @@ "end": 8640, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3158,7 +3118,6 @@ "end": 8936, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3275,7 +3234,6 @@ "end": 9409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3405,8 +3363,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3423,8 +3379,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3446,8 +3401,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3464,8 +3417,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3487,8 +3439,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3505,8 +3455,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3528,8 +3477,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3556,8 +3503,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3797,8 +3743,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3825,8 +3769,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3941,8 +3884,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3959,8 +3900,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3982,8 +3922,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4010,8 +3948,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4051,7 +3988,6 @@ "end": 9958, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4091,7 +4027,6 @@ "end": 10129, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4159,7 +4094,6 @@ "end": 10399, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4227,7 +4161,6 @@ "end": 10613, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4317,7 +4250,6 @@ "end": 10972, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4412,7 +4344,6 @@ "end": 11298, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4507,7 +4438,6 @@ "end": 11489, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4575,7 +4505,6 @@ "end": 11766, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4651,7 +4580,6 @@ "end": 12052, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4737,7 +4665,6 @@ "end": 12457, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4832,7 +4759,6 @@ "end": 12832, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5022,7 +4948,6 @@ "end": 13255, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5127,7 +5052,6 @@ "end": 13648, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5327,7 +5251,6 @@ "end": 13850, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5395,7 +5318,6 @@ "end": 14052, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5473,7 +5395,6 @@ "end": 14511, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5568,7 +5489,6 @@ "end": 14957, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5671,7 +5591,6 @@ "end": 15412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5784,7 +5703,6 @@ "end": 15937, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5879,7 +5797,6 @@ "end": 16041, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5919,7 +5836,6 @@ "end": 16194, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5959,7 +5875,6 @@ "end": 16298, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5999,7 +5914,6 @@ "end": 16485, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6039,7 +5953,6 @@ "end": 16608, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6092,8 +6005,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6110,8 +6021,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -6120,7 +6030,6 @@ "end": 17072, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6448,8 +6357,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6476,8 +6383,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -6486,7 +6392,6 @@ "end": 17381, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6789,8 +6694,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6817,8 +6720,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6864,7 +6766,6 @@ "end": 17762, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6932,7 +6833,6 @@ "end": 18011, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7000,7 +6900,6 @@ "end": 18275, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7068,7 +6967,6 @@ "end": 18571, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7313,8 +7211,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7341,8 +7237,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7364,8 +7259,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7382,8 +7275,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7405,8 +7297,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7423,8 +7313,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7446,8 +7335,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7464,8 +7351,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7487,8 +7373,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7505,8 +7389,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7528,8 +7411,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7546,8 +7427,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7606,8 +7486,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7624,8 +7502,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7647,8 +7524,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7665,8 +7540,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7688,8 +7562,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7706,8 +7578,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7729,8 +7600,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7747,8 +7616,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7770,8 +7638,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7788,8 +7654,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7811,8 +7676,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7829,8 +7692,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7852,8 +7714,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7870,8 +7730,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7893,8 +7752,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7911,8 +7768,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -7921,7 +7777,6 @@ "end": 20646, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7989,7 +7844,6 @@ "end": 20796, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8057,7 +7911,6 @@ "end": 20924, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8125,7 +7978,6 @@ "end": 21089, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8193,7 +8045,6 @@ "end": 21378, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8288,7 +8139,6 @@ "end": 21547, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8356,7 +8206,6 @@ "end": 21715, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8424,7 +8273,6 @@ "end": 21898, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8492,7 +8340,6 @@ "end": 22065, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8560,7 +8407,6 @@ "end": 22210, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8628,7 +8474,6 @@ "end": 22394, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8718,7 +8563,6 @@ "end": 22579, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8808,7 +8652,6 @@ "end": 22817, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8903,7 +8746,6 @@ "end": 22897, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8943,7 +8785,6 @@ "end": 23086, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9011,7 +8852,6 @@ "end": 23251, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9079,7 +8919,6 @@ "end": 23381, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9147,7 +8986,6 @@ "end": 23549, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9305,7 +9143,6 @@ "end": 23870, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9345,7 +9182,6 @@ "end": 23943, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9385,7 +9221,6 @@ "end": 24016, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9425,7 +9260,6 @@ "end": 24145, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9465,7 +9299,6 @@ "end": 24277, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9505,7 +9338,6 @@ "end": 24409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9545,7 +9377,6 @@ "end": 24526, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9585,7 +9416,6 @@ "end": 24597, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9625,7 +9455,6 @@ "end": 24668, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9665,7 +9494,6 @@ "end": 24763, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9705,7 +9533,6 @@ "end": 24832, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9745,7 +9572,6 @@ "end": 24942, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9785,7 +9611,6 @@ "end": 25021, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9825,7 +9650,6 @@ "end": 25125, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9865,7 +9689,6 @@ "end": 25202, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9905,7 +9728,6 @@ "end": 25303, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9945,7 +9767,6 @@ "end": 25382, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9985,7 +9806,6 @@ "end": 25498, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10025,7 +9845,6 @@ "end": 25588, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10065,7 +9884,6 @@ "end": 25702, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10105,7 +9923,6 @@ "end": 25792, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10145,7 +9962,6 @@ "end": 25906, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10185,7 +10001,6 @@ "end": 25999, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10225,7 +10040,6 @@ "end": 26123, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10265,7 +10079,6 @@ "end": 26275, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10305,7 +10118,6 @@ "end": 26507, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10373,7 +10185,6 @@ "end": 26705, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10441,7 +10252,6 @@ "end": 26929, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10509,7 +10319,6 @@ "end": 27196, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10604,7 +10413,6 @@ "end": 27486, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10699,7 +10507,6 @@ "end": 27831, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10821,7 +10628,6 @@ "end": 28200, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10943,7 +10749,6 @@ "end": 28617, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11092,7 +10897,6 @@ "end": 29060, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11241,7 +11045,6 @@ "end": 29265, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11309,7 +11112,6 @@ "end": 29490, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11377,7 +11179,6 @@ "end": 29913, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11472,7 +11273,6 @@ "end": 30353, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11567,7 +11367,6 @@ "end": 30756, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11689,7 +11488,6 @@ "end": 31226, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11811,7 +11609,6 @@ "end": 31341, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11851,7 +11648,6 @@ "end": 31427, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11891,7 +11687,6 @@ "end": 31605, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -12437,8 +12232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12465,8 +12258,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -12475,7 +12267,6 @@ "end": 32079, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -12543,7 +12334,6 @@ "end": 33117, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -12773,7 +12563,6 @@ "end": 33136, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -12919,8 +12708,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12937,8 +12724,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -12960,8 +12746,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12978,8 +12762,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13001,8 +12784,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13019,8 +12800,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -13029,7 +12809,6 @@ "end": 33280, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13069,7 +12848,6 @@ "end": 33310, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13109,7 +12887,6 @@ "end": 33354, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13215,7 +12992,6 @@ "end": 33392, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13283,7 +13059,6 @@ "end": 33411, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13323,7 +13098,6 @@ "end": 33449, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13413,7 +13187,6 @@ "end": 33474, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13461,7 +13234,6 @@ "end": 33495, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13501,7 +13273,6 @@ "end": 33546, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13604,7 +13375,6 @@ "end": 33612, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13753,7 +13523,6 @@ "end": 33649, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13829,7 +13598,6 @@ "end": 33727, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13981,7 +13749,6 @@ "end": 33768, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -14071,7 +13838,6 @@ "end": 33833, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -14166,7 +13932,6 @@ "end": 33901, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -14261,7 +14026,6 @@ "end": 34008, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -14464,7 +14228,6 @@ "end": 34114, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -14667,7 +14430,6 @@ "end": 34217, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -14870,7 +14632,6 @@ "end": 34316, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -15081,7 +14842,6 @@ "end": 34425, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -15292,7 +15052,6 @@ "end": 34561, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -15522,7 +15281,6 @@ "end": 34702, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -15783,7 +15541,6 @@ "end": 35010, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -15861,7 +15618,6 @@ "end": 35226, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -15942,8 +15698,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15960,8 +15714,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -15983,8 +15736,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16001,8 +15752,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16024,8 +15774,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16042,8 +15790,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16065,8 +15812,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16083,8 +15828,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16106,8 +15850,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16124,8 +15866,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -16134,7 +15875,6 @@ "end": 36001, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -16425,8 +16165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16443,8 +16181,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16466,8 +16203,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16484,8 +16219,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16507,8 +16241,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16525,8 +16257,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16548,8 +16279,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16566,8 +16295,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16589,8 +16317,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16607,8 +16333,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16630,8 +16355,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16648,8 +16371,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16671,8 +16393,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16689,8 +16409,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16712,8 +16431,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16730,8 +16447,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16753,8 +16469,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16771,8 +16485,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16794,8 +16507,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16812,8 +16523,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -16872,8 +16582,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16890,8 +16598,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -16913,8 +16620,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -16931,8 +16636,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -17128,8 +16832,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -17156,8 +16858,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -17409,8 +17110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -17437,8 +17136,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -17690,8 +17388,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -17718,8 +17414,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -17971,8 +17666,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -17999,8 +17692,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -18252,8 +17944,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -18280,8 +17970,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -18533,8 +18222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -18561,8 +18248,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -18814,8 +18500,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -18842,8 +18526,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -18889,7 +18572,6 @@ "end": 37978, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -19057,7 +18739,6 @@ "end": 38199, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -19125,7 +18806,6 @@ "end": 38528, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -19293,7 +18973,6 @@ "end": 38825, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -19396,7 +19075,6 @@ "end": 39301, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -19591,7 +19269,6 @@ "end": 39745, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -19843,7 +19520,6 @@ "end": 40150, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -19883,7 +19559,6 @@ "end": 40180, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -19923,7 +19598,6 @@ "end": 40348, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20099,7 +19773,6 @@ "end": 40501, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20217,7 +19890,6 @@ "end": 40816, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20285,7 +19957,6 @@ "end": 40910, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20335,7 +20006,6 @@ "end": 41091, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20435,7 +20105,6 @@ "end": 41172, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20493,7 +20162,6 @@ "end": 41269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20543,7 +20211,6 @@ "end": 41512, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20656,7 +20323,6 @@ "end": 41773, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20835,7 +20501,6 @@ "end": 42047, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20921,7 +20586,6 @@ "end": 42507, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -21093,7 +20757,6 @@ "end": 42684, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -21193,7 +20856,6 @@ "end": 43024, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -21298,7 +20960,6 @@ "end": 43397, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -21403,7 +21064,6 @@ "end": 43966, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -21626,7 +21286,6 @@ "end": 44550, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -21849,7 +21508,6 @@ "end": 45040, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -22072,7 +21730,6 @@ "end": 45581, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -22355,7 +22012,6 @@ "end": 46112, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -22596,7 +22252,6 @@ "end": 46855, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -22886,7 +22541,6 @@ "end": 47599, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -23208,7 +22862,6 @@ "end": 48375, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -23498,7 +23151,6 @@ "end": 49152, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -23833,8 +23485,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -23851,8 +23501,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -24581,7 +24230,6 @@ "end": 49596, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -24662,8 +24310,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24708,8 +24354,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.json index 484e2bd7a2bc..c7b05ef5d531 100644 --- a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientFunctionWithTheSameNameAndCommonRoot.json @@ -101,8 +101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -119,8 +117,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -142,8 +139,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +155,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -235,8 +229,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -253,8 +245,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -276,8 +267,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -294,8 +283,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -362,8 +350,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -380,8 +366,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -403,8 +388,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -421,8 +404,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.json index f71e9b8a441f..a02793ed7225 100644 --- a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndAmbientWithSameNameAndCommonRoot.json @@ -135,8 +135,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -153,8 +151,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -176,8 +173,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -194,8 +189,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -525,8 +519,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -543,8 +535,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -566,8 +557,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -584,8 +573,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.json index aacfff42442f..833eb79531b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientClassWithSameNameAndCommonRoot.json @@ -135,8 +135,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -153,8 +151,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -176,8 +173,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -194,8 +189,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -449,8 +443,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -467,8 +459,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -490,8 +481,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -508,8 +497,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.json index 009f1f79b0d4..89d79fc34dd1 100644 --- a/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/AmbientModuleAndNonAmbientFunctionWithTheSameNameAndCommonRoot.json @@ -101,8 +101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -119,8 +117,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -142,8 +139,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +155,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -336,8 +330,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -354,8 +346,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -377,8 +368,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -395,8 +384,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.json index 2911e3a205c8..0c465a25d1ca 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRoot.json @@ -1112,8 +1112,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1130,8 +1128,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.json index 64cf68f10cfe..f0f1f6982b5d 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleWithSameNameAndCommonRootES6.json @@ -1112,8 +1112,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1130,8 +1128,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty1.json b/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty1.json index 70d6bcf075f4..3c5fe7f4b640 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty1.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty1.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty4.json b/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty4.json index f075aae7ec53..d4ba2b237e1f 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty4.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty4.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty5.json b/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty5.json index f36a63ab1c3d..0bcc6c2f587b 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty5.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty5.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "symbol" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty7.json b/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty7.json index 1350f0079b47..9fc24bd8ed78 100644 --- a/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty7.json +++ b/crates/swc_ecma_parser/tests/tsc/ES5SymbolProperty7.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.json index 9193810d1db8..794466a6e158 100644 --- a/crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/EnumAndModuleWithSameNameAndCommonRoot.json @@ -420,8 +420,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -438,8 +436,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -461,8 +458,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -479,8 +474,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.json b/crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.json index ce2937d7003f..b9105528b415 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportClassWhichExtendsInterfaceWithInaccessibleType.json @@ -81,8 +81,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -99,8 +97,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -122,8 +119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +135,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -150,7 +144,6 @@ "end": 111, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json index 5e0ec05532e4..bafeb2430df5 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -351,8 +345,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -369,8 +361,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -712,8 +703,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -740,8 +729,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -763,8 +751,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -791,8 +777,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.json index dd584caa3259..abce9c998ece 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInIndexerTypeAnnotations.json @@ -81,8 +81,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -99,8 +97,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -122,8 +119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +135,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json index a72ff59529da..a793098a96ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json @@ -81,8 +81,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -99,8 +97,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -122,8 +119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +135,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -343,8 +337,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -361,8 +353,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -704,8 +695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -732,8 +721,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -755,8 +743,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -783,8 +769,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.json index ca74877aacd3..d31ccb2ae496 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportObjectLiteralAndObjectTypeLiteralWithAccessibleTypesInNestedMemberTypeAnnotations.json @@ -237,8 +237,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -274,8 +272,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -302,8 +298,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -325,8 +320,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -353,13 +346,11 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -381,8 +372,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -418,8 +407,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -446,8 +433,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -469,8 +455,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -497,13 +481,11 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ExportVariableWithAccessibleTypeInTypeAnnotation.json b/crates/swc_ecma_parser/tests/tsc/ExportVariableWithAccessibleTypeInTypeAnnotation.json index 2b666de1fd98..8414690e0b6c 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportVariableWithAccessibleTypeInTypeAnnotation.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportVariableWithAccessibleTypeInTypeAnnotation.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ExportVariableWithInaccessibleTypeInTypeAnnotation.json b/crates/swc_ecma_parser/tests/tsc/ExportVariableWithInaccessibleTypeInTypeAnnotation.json index ff539a039651..4f4402f01bd8 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportVariableWithInaccessibleTypeInTypeAnnotation.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportVariableWithInaccessibleTypeInTypeAnnotation.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -344,8 +338,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -362,8 +354,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/FunctionAndModuleWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/FunctionAndModuleWithSameNameAndCommonRoot.json index 51c182118bf9..1eabd6796f98 100644 --- a/crates/swc_ecma_parser/tests/tsc/FunctionAndModuleWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/FunctionAndModuleWithSameNameAndCommonRoot.json @@ -384,8 +384,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -402,8 +400,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -425,8 +422,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -443,8 +438,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -578,8 +572,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -596,8 +588,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -619,8 +610,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -637,8 +626,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1145,8 +1133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1163,8 +1149,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1186,8 +1171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1204,8 +1187,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1339,8 +1321,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1357,8 +1337,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1380,8 +1359,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1398,8 +1375,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/FunctionAndModuleWithSameNameAndDifferentCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/FunctionAndModuleWithSameNameAndDifferentCommonRoot.json index e9f4bbd18fc6..9298e55e6f3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/FunctionAndModuleWithSameNameAndDifferentCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/FunctionAndModuleWithSameNameAndDifferentCommonRoot.json @@ -384,8 +384,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -402,8 +400,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -425,8 +422,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -443,8 +438,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -578,8 +572,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -596,8 +588,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -619,8 +610,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -637,8 +626,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/InvalidNonInstantiatedModule.json b/crates/swc_ecma_parser/tests/tsc/InvalidNonInstantiatedModule.json index 47c57d16903a..279612d658ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/InvalidNonInstantiatedModule.json +++ b/crates/swc_ecma_parser/tests/tsc/InvalidNonInstantiatedModule.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleAndEnumWithSameNameAndCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/ModuleAndEnumWithSameNameAndCommonRoot.json index 2f3ee85659bd..1ab773534301 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleAndEnumWithSameNameAndCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleAndEnumWithSameNameAndCommonRoot.json @@ -420,8 +420,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -438,8 +436,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -461,8 +458,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -479,8 +474,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedClasses.json b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedClasses.json index e6aa6f6d47a2..9787543e718a 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedClasses.json @@ -731,8 +731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -749,8 +747,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -772,8 +769,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -790,8 +785,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json index 00970c6b82d4..de71c71ffc06 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedImportAlias.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -222,8 +216,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -240,8 +232,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -945,8 +936,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -963,8 +952,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -986,8 +974,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1004,8 +990,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1222,8 +1207,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1259,8 +1242,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1277,8 +1258,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1300,8 +1280,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1318,13 +1296,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1346,8 +1322,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1383,8 +1357,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1401,8 +1373,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1424,8 +1395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1442,13 +1411,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/Protected8.json b/crates/swc_ecma_parser/tests/tsc/Protected8.json index d2e1da2fa162..77a9fb6b6ce5 100644 --- a/crates/swc_ecma_parser/tests/tsc/Protected8.json +++ b/crates/swc_ecma_parser/tests/tsc/Protected8.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -79,10 +76,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.json index a2a35c6a3720..f6f0e1f63e7f 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedClassesOfTheSameName.json @@ -486,8 +486,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -504,8 +502,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -527,8 +524,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -545,8 +540,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1018,8 +1012,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1036,8 +1028,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.json index 8ac1c1fa8a74..dd420f6af260 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedInterfacesOfTheSameName.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -157,7 +151,6 @@ "end": 104, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -269,7 +262,6 @@ "end": 174, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -379,8 +371,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -397,8 +387,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -420,8 +409,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -438,8 +425,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -448,7 +434,6 @@ "end": 263, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -934,8 +919,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -975,8 +958,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -998,8 +980,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1039,8 +1019,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json index 551db6792ba2..89fff85a7f63 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -908,8 +902,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -926,8 +918,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -949,8 +940,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -967,8 +956,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1274,8 +1262,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1315,8 +1301,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1338,8 +1323,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1379,8 +1362,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.json index 6f78a0ef3353..cf37c2e56758 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedInterfacesOfTheSameName.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -157,7 +151,6 @@ "end": 104, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -276,7 +269,6 @@ "end": 181, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -387,8 +379,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -405,8 +395,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -428,8 +417,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -446,8 +433,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -456,7 +442,6 @@ "end": 270, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -519,7 +504,6 @@ "end": 292, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1012,8 +996,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1053,8 +1035,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1076,8 +1057,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1117,8 +1096,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1193,8 +1171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1234,8 +1210,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1257,8 +1232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1298,8 +1271,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsConstructSignatureDeclaration", diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json index 3b8c26579c86..9a161a84ed1d 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json @@ -95,8 +95,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +111,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -136,8 +133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -154,8 +149,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.json index 416b216b5c14..884ed789d079 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedModulesOfTheSameName.json @@ -746,8 +746,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -764,8 +762,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json index ed0112bbbe2c..6d4355f73850 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json @@ -122,8 +122,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +138,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -163,8 +160,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -181,8 +176,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json index 65031acf896e..36a5aeaaa4ca 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -850,8 +844,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -868,8 +860,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -891,8 +882,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -909,8 +898,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1216,8 +1204,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1257,8 +1243,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1280,8 +1265,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1321,8 +1304,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty5.json b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty5.json index 2ef6f3bfdd70..4ca924e7ad9f 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty5.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty5.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json index 18996596e403..fe0874b178c2 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json @@ -1011,8 +1011,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1096,8 +1094,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json index a0eec77b49fc..9ad20c9b99b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json @@ -703,8 +703,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -759,8 +757,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/allowImportingTypesDtsExtension.json b/crates/swc_ecma_parser/tests/tsc/allowImportingTypesDtsExtension.json index 8c93be5843fd..d2c23466198b 100644 --- a/crates/swc_ecma_parser/tests/tsc/allowImportingTypesDtsExtension.json +++ b/crates/swc_ecma_parser/tests/tsc/allowImportingTypesDtsExtension.json @@ -60,8 +60,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -78,8 +76,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsPatterns_merging3.json b/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsPatterns_merging3.json index 59d02ae9d584..fe8dd0680336 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsPatterns_merging3.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientDeclarationsPatterns_merging3.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -198,8 +195,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +211,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/amdImportNotAsPrimaryExpression.json b/crates/swc_ecma_parser/tests/tsc/amdImportNotAsPrimaryExpression.json index ce2d849b48df..2c6a75a302a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/amdImportNotAsPrimaryExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/amdImportNotAsPrimaryExpression.json @@ -171,8 +171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +187,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -212,8 +209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -230,8 +225,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -326,8 +320,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -344,8 +336,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -706,8 +697,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -724,8 +713,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json index 3428570064a5..2078d159ca4e 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json @@ -110,8 +110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -128,8 +126,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1409,8 +1406,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1427,8 +1422,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1481,8 +1475,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1499,8 +1491,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1939,8 +1930,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1957,8 +1946,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json index 7763e7d77175..35144c7ee1c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json @@ -234,8 +234,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -252,8 +250,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1390,8 +1387,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1408,8 +1403,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json index 7465ee2eed8b..32f602001073 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json @@ -110,8 +110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -128,8 +126,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -238,8 +235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +251,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -366,8 +360,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -384,8 +376,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -494,8 +485,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -512,8 +501,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -632,8 +620,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -650,8 +636,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -770,8 +755,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -788,8 +771,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -888,8 +870,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -906,8 +886,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -940,8 +919,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -958,8 +935,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1076,8 +1052,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1094,8 +1068,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1214,8 +1187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1232,8 +1203,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1424,8 +1394,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1442,8 +1410,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1694,8 +1661,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1712,8 +1677,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1852,8 +1816,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1870,8 +1832,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -2078,8 +2039,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2096,8 +2055,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -2257,8 +2215,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2275,8 +2231,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -2509,8 +2464,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2527,8 +2480,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -2799,8 +2751,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2817,8 +2767,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -2969,8 +2918,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2987,8 +2934,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -3180,8 +3126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3198,8 +3142,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -3318,8 +3261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3336,8 +3277,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -3446,8 +3386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3464,8 +3402,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json index 5ba198d90f51..7f249a1a1475 100644 --- a/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/argumentExpressionContextualTyping.json @@ -801,8 +801,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -856,8 +854,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -879,8 +876,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -916,8 +911,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -934,8 +927,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -957,8 +949,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -975,8 +965,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -998,8 +987,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1016,13 +1003,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithInvalidOperands.json b/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithInvalidOperands.json index 47f93c695a01..e00f89fccdcc 100644 --- a/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithInvalidOperands.json +++ b/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithInvalidOperands.json @@ -342,8 +342,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -360,8 +358,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/arityAndOrderCompatibility01.json b/crates/swc_ecma_parser/tests/tsc/arityAndOrderCompatibility01.json index f1e23c8636fb..053b909d74ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/arityAndOrderCompatibility01.json +++ b/crates/swc_ecma_parser/tests/tsc/arityAndOrderCompatibility01.json @@ -111,8 +111,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -129,8 +127,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -152,8 +149,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -170,8 +165,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -193,8 +187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -220,8 +212,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] } @@ -432,8 +423,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -450,8 +439,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -473,8 +461,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -491,8 +477,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -514,8 +499,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -541,8 +524,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/arrayLiteralInference.json b/crates/swc_ecma_parser/tests/tsc/arrayLiteralInference.json index bae877569598..8ebc46c590a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrayLiteralInference.json +++ b/crates/swc_ecma_parser/tests/tsc/arrayLiteralInference.json @@ -1197,8 +1197,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1215,8 +1213,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/arrayLiteralWithMultipleBestCommonTypes.json b/crates/swc_ecma_parser/tests/tsc/arrayLiteralWithMultipleBestCommonTypes.json index 7407f0fbcbaf..b94e4225d8c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrayLiteralWithMultipleBestCommonTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/arrayLiteralWithMultipleBestCommonTypes.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -108,8 +105,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +121,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -240,8 +231,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,8 +247,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -331,8 +319,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -349,8 +335,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -372,8 +357,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -390,8 +373,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1029,8 +1011,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1047,8 +1027,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1070,8 +1049,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1088,8 +1065,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1166,8 +1142,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1184,8 +1158,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1207,8 +1180,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1225,8 +1196,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1345,8 +1315,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1363,8 +1331,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1386,8 +1353,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1404,8 +1369,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1482,8 +1446,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1500,8 +1462,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1523,8 +1484,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1541,8 +1500,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/arrayLiterals.json b/crates/swc_ecma_parser/tests/tsc/arrayLiterals.json index 66ddbd619a8e..2df1620e06a3 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrayLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/arrayLiterals.json @@ -995,8 +995,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1013,8 +1011,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1036,8 +1033,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1054,8 +1049,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/arrayLiterals3.json b/crates/swc_ecma_parser/tests/tsc/arrayLiterals3.json index cf6b422a61be..03ceb6406a14 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrayLiterals3.json +++ b/crates/swc_ecma_parser/tests/tsc/arrayLiterals3.json @@ -850,8 +850,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -903,8 +901,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -926,8 +923,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -979,8 +974,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/arraySpreadInCall.json b/crates/swc_ecma_parser/tests/tsc/arraySpreadInCall.json index 940c572167fc..aba8b597113b 100644 --- a/crates/swc_ecma_parser/tests/tsc/arraySpreadInCall.json +++ b/crates/swc_ecma_parser/tests/tsc/arraySpreadInCall.json @@ -2958,7 +2958,6 @@ "end": 1038, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/asOperatorAmbiguity.json b/crates/swc_ecma_parser/tests/tsc/asOperatorAmbiguity.json index a766fa07a26d..861f51a66fa7 100644 --- a/crates/swc_ecma_parser/tests/tsc/asOperatorAmbiguity.json +++ b/crates/swc_ecma_parser/tests/tsc/asOperatorAmbiguity.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -114,8 +112,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -168,8 +165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -186,8 +181,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json b/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json index 2b9265d35f4a..41f36a3c61e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json @@ -840,8 +840,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -858,8 +856,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json b/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json index 119a7bb70521..97f46cfd3a40 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json @@ -914,8 +914,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -932,8 +930,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignFromBooleanInterface2.json b/crates/swc_ecma_parser/tests/tsc/assignFromBooleanInterface2.json index 6618f7860537..ef134a7fcf26 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignFromBooleanInterface2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignFromBooleanInterface2.json @@ -41,7 +41,6 @@ "end": 43, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -112,7 +111,6 @@ "end": 92, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignFromNumberInterface2.json b/crates/swc_ecma_parser/tests/tsc/assignFromNumberInterface2.json index 505eed2848c6..e7d8b6960437 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignFromNumberInterface2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignFromNumberInterface2.json @@ -41,7 +41,6 @@ "end": 42, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -112,7 +111,6 @@ "end": 105, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -180,7 +178,6 @@ "end": 151, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -248,7 +245,6 @@ "end": 203, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -316,7 +312,6 @@ "end": 248, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -384,7 +379,6 @@ "end": 271, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -424,7 +418,6 @@ "end": 294, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignFromStringInterface2.json b/crates/swc_ecma_parser/tests/tsc/assignFromStringInterface2.json index 2a2d35f7969a..cb24f762759f 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignFromStringInterface2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignFromStringInterface2.json @@ -41,7 +41,6 @@ "end": 42, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -112,7 +111,6 @@ "end": 90, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -152,7 +150,6 @@ "end": 114, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -192,7 +189,6 @@ "end": 147, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -260,7 +256,6 @@ "end": 186, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -328,7 +323,6 @@ "end": 228, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -418,7 +412,6 @@ "end": 290, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -513,7 +506,6 @@ "end": 356, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -608,7 +600,6 @@ "end": 397, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -676,7 +667,6 @@ "end": 442, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -754,7 +744,6 @@ "end": 487, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -842,7 +831,6 @@ "end": 551, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -937,7 +925,6 @@ "end": 654, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1127,7 +1114,6 @@ "end": 718, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1232,7 +1218,6 @@ "end": 821, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1432,7 +1417,6 @@ "end": 857, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1500,7 +1484,6 @@ "end": 893, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1578,7 +1561,6 @@ "end": 942, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1673,7 +1655,6 @@ "end": 998, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1776,7 +1757,6 @@ "end": 1054, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1889,7 +1869,6 @@ "end": 1106, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1984,7 +1963,6 @@ "end": 1133, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2024,7 +2002,6 @@ "end": 1166, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2064,7 +2041,6 @@ "end": 1193, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2104,7 +2080,6 @@ "end": 1226, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2144,7 +2119,6 @@ "end": 1246, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2197,8 +2171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2215,8 +2187,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -2225,7 +2196,6 @@ "end": 1317, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2320,7 +2290,6 @@ "end": 1340, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json index 5748c5fe5843..9cd18a416489 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json @@ -41,7 +41,6 @@ "end": 148, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -212,7 +211,6 @@ "end": 188, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -393,7 +391,6 @@ "end": 247, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -564,7 +561,6 @@ "end": 290, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1936,7 +1932,6 @@ "end": 694, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2107,7 +2102,6 @@ "end": 737, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json index 4566b03b966c..bf1ede539ef7 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json @@ -2145,8 +2145,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2163,8 +2161,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2214,8 +2211,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2232,8 +2227,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2255,8 +2249,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2273,8 +2265,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2874,8 +2865,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2892,8 +2881,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2915,8 +2903,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2933,8 +2919,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6816,8 +6801,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6834,8 +6817,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6857,8 +6839,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6875,8 +6855,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -8496,8 +8475,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8524,8 +8501,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8547,8 +8523,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8575,8 +8549,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json index 53a998b93939..a7c2ef164301 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json @@ -1247,8 +1247,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1265,8 +1263,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1316,8 +1313,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1334,8 +1329,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1357,8 +1351,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1375,8 +1367,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1916,8 +1907,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1934,8 +1923,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1957,8 +1945,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1975,8 +1961,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3976,8 +3961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3994,8 +3977,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5281,8 +5263,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5309,8 +5289,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5332,8 +5311,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5360,8 +5337,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5597,8 +5573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5625,8 +5599,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5648,8 +5621,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5676,8 +5647,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json index 055890518ebf..2bbe01da33ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json @@ -1487,8 +1487,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1515,8 +1513,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1566,8 +1563,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1594,8 +1589,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1617,8 +1611,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1645,8 +1637,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1806,8 +1797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1834,8 +1823,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1857,8 +1845,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1885,8 +1871,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2054,8 +2039,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2082,8 +2065,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2105,8 +2087,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2133,8 +2113,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5014,8 +4993,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5042,8 +5019,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5093,8 +5069,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5121,8 +5095,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5144,8 +5117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5172,8 +5143,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5432,8 +5402,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5460,8 +5428,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5483,8 +5450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5511,8 +5476,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5779,8 +5743,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5807,8 +5769,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5830,8 +5791,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5858,8 +5817,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json index 0ebaf5f19129..82077ad3ba7c 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -493,8 +491,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -516,8 +513,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -630,8 +625,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -653,8 +647,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -759,8 +751,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -782,8 +773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -948,8 +937,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -971,8 +959,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1166,8 +1152,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1189,8 +1174,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1379,8 +1362,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1402,8 +1384,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1463,8 +1443,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1491,8 +1469,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1542,8 +1519,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1570,8 +1545,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1593,8 +1567,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1621,8 +1593,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1690,8 +1661,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1713,8 +1683,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1774,8 +1742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1802,8 +1768,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1825,8 +1790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1853,8 +1816,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1930,8 +1892,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1953,8 +1914,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2014,8 +1973,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2042,8 +1999,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2065,8 +2021,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2093,8 +2047,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2188,8 +2141,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3763,8 +3715,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3791,8 +3741,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3842,8 +3791,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3870,8 +3817,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3893,8 +3839,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3921,8 +3865,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4216,8 +4159,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4244,8 +4185,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4267,8 +4207,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4295,8 +4233,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithOptionalParameters.json index 32b69c8a6232..4cf161015a4f 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithOptionalParameters.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -113,8 +110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -177,8 +172,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -200,8 +194,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -264,8 +256,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -287,8 +278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -378,8 +367,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -401,8 +389,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -492,8 +478,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -515,8 +500,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -606,8 +589,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithRestParameters.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithRestParameters.json index f210360feabf..1214bc65688f 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithRestParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignaturesWithRestParameters.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +138,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -163,8 +160,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +271,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -299,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -439,8 +431,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -462,8 +453,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -602,8 +591,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures2.json index d3ffc457e74c..580e08c4dfff 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -119,8 +117,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -245,8 +242,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -310,8 +305,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -446,8 +440,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -511,8 +503,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -637,8 +628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -702,8 +691,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1219,7 +1207,6 @@ "end": 512, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1390,7 +1377,6 @@ "end": 555, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json index dbf1eed9630b..de25e2385406 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json @@ -2155,8 +2155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2173,8 +2171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2224,8 +2221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2242,8 +2237,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2265,8 +2259,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2283,8 +2275,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2887,8 +2878,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2905,8 +2894,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2928,8 +2916,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2946,8 +2932,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6840,8 +6825,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6858,8 +6841,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6881,8 +6863,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6899,8 +6879,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -8525,8 +8504,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8553,8 +8530,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8576,8 +8552,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8604,8 +8578,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json index bad66a303b96..6efbfc4b1d4b 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json @@ -1251,8 +1251,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1269,8 +1267,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1320,8 +1317,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1338,8 +1333,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1361,8 +1355,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1379,8 +1371,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1922,8 +1913,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1940,8 +1929,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1963,8 +1951,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1981,8 +1967,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3985,8 +3970,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4003,8 +3986,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5294,8 +5276,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5322,8 +5302,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5345,8 +5324,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5373,8 +5350,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5611,8 +5587,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5639,8 +5613,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5662,8 +5635,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5690,8 +5661,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json index 33e2f6cf5d10..83fe88cc25f6 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json @@ -1495,8 +1495,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1523,8 +1521,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1574,8 +1571,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1602,8 +1597,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1625,8 +1619,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1653,8 +1645,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1815,8 +1806,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1843,8 +1832,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1866,8 +1854,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1894,8 +1880,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2064,8 +2049,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2092,8 +2075,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2115,8 +2097,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2143,8 +2123,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5035,8 +5014,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5063,8 +5040,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5114,8 +5090,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5142,8 +5116,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5165,8 +5138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5193,8 +5164,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5454,8 +5424,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5482,8 +5450,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5505,8 +5472,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5533,8 +5498,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5802,8 +5766,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5830,8 +5792,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5853,8 +5814,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5881,8 +5840,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json index 2bdd0c0aa04e..e26e136b9555 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -494,8 +492,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -517,8 +514,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -632,8 +627,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -655,8 +649,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -762,8 +754,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -785,8 +776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -952,8 +941,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -975,8 +963,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1171,8 +1157,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1194,8 +1179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1385,8 +1368,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1408,8 +1390,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1469,8 +1449,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1497,8 +1475,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1548,8 +1525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1576,8 +1551,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1599,8 +1573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1627,8 +1599,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1697,8 +1668,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1720,8 +1690,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1781,8 +1749,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1809,8 +1775,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1832,8 +1797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1860,8 +1823,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1938,8 +1900,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1961,8 +1922,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2022,8 +1981,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2050,8 +2007,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2073,8 +2029,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2101,8 +2055,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2197,8 +2150,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3777,8 +3729,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3805,8 +3755,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3856,8 +3805,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3884,8 +3831,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3907,8 +3853,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3935,8 +3879,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4231,8 +4174,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4259,8 +4200,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4282,8 +4222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4310,8 +4248,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignaturesWithOptionalParameters.json index 7331e7f3826b..c57a81b82b28 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignaturesWithOptionalParameters.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -91,8 +89,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -114,8 +111,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -179,8 +174,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -202,8 +196,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +259,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -290,8 +281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -382,8 +371,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -405,8 +393,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -497,8 +483,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -520,8 +505,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -612,8 +595,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithDiscriminatedUnion.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithDiscriminatedUnion.json index 0a66945a81c9..c0dd22574e41 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithDiscriminatedUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithDiscriminatedUnion.json @@ -80,8 +80,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -98,8 +96,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -121,8 +118,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -139,8 +134,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -200,8 +194,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -226,8 +218,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -249,8 +240,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +256,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -300,8 +288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -326,8 +312,7 @@ "value": false } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -349,8 +334,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -367,8 +350,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -608,8 +590,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -663,8 +643,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -686,8 +665,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -713,8 +690,7 @@ "raw": "4" } } - }, - "typeParams": null + } } ] } @@ -774,8 +750,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -801,8 +775,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -824,8 +797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -879,8 +850,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -912,8 +882,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -939,8 +907,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -962,8 +929,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -989,8 +954,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] }, @@ -1022,8 +986,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1049,8 +1011,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1072,8 +1033,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1127,8 +1086,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1368,8 +1326,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1423,8 +1379,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1446,8 +1401,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1473,8 +1426,7 @@ "raw": "4" } } - }, - "typeParams": null + } } ] } @@ -1534,8 +1486,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1561,8 +1511,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1584,8 +1533,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1639,8 +1586,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -1672,8 +1618,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1699,8 +1643,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1722,8 +1665,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1777,8 +1718,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -1810,8 +1750,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1837,8 +1775,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1860,8 +1797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1887,8 +1822,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -2128,8 +2062,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2183,8 +2115,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2206,8 +2137,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2233,8 +2162,7 @@ "raw": "4" } } - }, - "typeParams": null + } } ] } @@ -2294,8 +2222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2321,8 +2247,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2344,8 +2269,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2399,8 +2322,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -2432,8 +2354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2459,8 +2379,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2482,8 +2401,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2509,8 +2426,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] }, @@ -2542,8 +2458,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2569,8 +2483,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2592,8 +2505,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2647,8 +2558,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2670,8 +2580,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2688,8 +2596,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3013,8 +2920,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3041,8 +2946,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3064,8 +2968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3092,8 +2994,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3115,8 +3016,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3143,8 +3042,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3204,8 +3102,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3231,8 +3127,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3254,8 +3149,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3282,8 +3175,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3305,8 +3197,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3333,8 +3223,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -3366,8 +3255,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3393,8 +3280,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3416,8 +3302,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3444,8 +3328,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3467,8 +3350,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3495,8 +3376,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -3528,8 +3408,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3555,8 +3433,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3578,8 +3455,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3606,8 +3481,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3629,8 +3503,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3657,8 +3529,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -3690,8 +3561,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3718,8 +3587,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3741,8 +3609,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3768,8 +3634,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3791,8 +3656,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3819,8 +3682,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -3852,8 +3714,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3880,8 +3740,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3903,8 +3762,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3930,8 +3787,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3953,8 +3809,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3981,8 +3835,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -4014,8 +3867,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4042,8 +3893,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4065,8 +3915,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4092,8 +3940,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4115,8 +3962,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4143,8 +3988,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -4176,8 +4020,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4204,8 +4046,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4227,8 +4068,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4255,8 +4094,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4278,8 +4116,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4305,8 +4141,7 @@ "raw": "0" } } - }, - "typeParams": null + } } ] }, @@ -4338,8 +4173,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4366,8 +4199,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4389,8 +4221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4417,8 +4247,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4440,8 +4269,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4467,8 +4294,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] }, @@ -4500,8 +4326,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4528,8 +4352,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4551,8 +4374,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4579,8 +4400,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4602,8 +4422,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4629,8 +4447,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] } @@ -4878,8 +4695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4905,8 +4720,7 @@ "raw": "\"A\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4928,8 +4742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4946,8 +4758,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -4979,8 +4790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5006,8 +4815,7 @@ "raw": "\"B\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5029,8 +4837,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5047,8 +4853,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5102,8 +4907,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5157,8 +4960,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5180,8 +4982,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5198,8 +4998,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5565,8 +5364,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5592,8 +5389,7 @@ "raw": "'blue'" } } - }, - "typeParams": null + } } ] } @@ -5646,8 +5442,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5673,8 +5467,7 @@ "raw": "'yellow'" } } - }, - "typeParams": null + } } ] } @@ -6050,8 +5843,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6077,8 +5868,7 @@ "raw": "\"linear\"" } } - }, - "typeParams": null + } } ] } @@ -6131,8 +5921,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6158,8 +5946,7 @@ "raw": "\"categorical\"" } } - }, - "typeParams": null + } } ] } @@ -6787,8 +6574,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6814,8 +6599,7 @@ "raw": "'one'" } } - }, - "typeParams": null + } } ] } @@ -6868,8 +6652,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6895,8 +6677,7 @@ "raw": "'two'" } } - }, - "typeParams": null + } } ] } @@ -7269,8 +7050,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7296,8 +7075,7 @@ "raw": "'activate'" } } - }, - "typeParams": null + } } ] }, @@ -7329,8 +7107,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7356,8 +7132,7 @@ "raw": "'disactivate'" } } - }, - "typeParams": null + } } ] } @@ -7681,8 +7456,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7708,8 +7481,7 @@ "raw": "\"A1\"" } } - }, - "typeParams": null + } } ] } @@ -7762,8 +7534,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7789,8 +7559,7 @@ "raw": "\"A2\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json index 3eb3ee933b68..cb245ca5ab67 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json @@ -148,8 +148,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -166,8 +164,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -344,8 +341,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -362,8 +357,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json index 390a12c69f40..d7f631e1a874 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -114,8 +112,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer.json index cf5a2bc819f3..a7c932df4378 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer2.json index 39d9fee08648..828b716ac1d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer3.json index 60ebcd8d7f11..f69c3b9f0b62 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer3.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers.json index 3e9ddd5d46d8..f09939a20e3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers.json @@ -343,8 +343,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -361,8 +359,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -415,8 +412,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -433,8 +428,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -618,8 +612,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -636,8 +628,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -709,8 +700,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -727,8 +716,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1951,8 +1939,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1979,8 +1965,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2033,8 +2018,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2061,8 +2044,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2246,8 +2228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2274,8 +2254,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } @@ -2347,8 +2326,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2375,8 +2352,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers2.json index 5ad595194475..3265e0f097b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers2.json @@ -316,8 +316,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -334,8 +332,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -357,8 +354,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -375,8 +370,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -429,8 +423,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -447,8 +439,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -470,8 +461,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -488,8 +477,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -673,8 +661,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -691,8 +677,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -714,8 +699,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -732,8 +715,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -805,8 +787,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -823,8 +803,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -846,8 +825,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -864,8 +841,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers3.json index e94731921914..e7d6ad64eced 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers3.json @@ -356,8 +356,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -374,8 +372,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -397,8 +394,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -415,8 +410,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -469,8 +463,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -487,8 +479,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -510,8 +501,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -528,8 +517,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -713,8 +701,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -731,8 +717,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -754,8 +739,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -772,8 +755,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -845,8 +827,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -863,8 +843,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -886,8 +865,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -904,8 +881,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers4.json index b187384a358e..5b6fad3e23b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers4.json @@ -597,8 +597,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -625,8 +623,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -679,8 +676,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -707,8 +702,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -892,8 +886,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -920,8 +912,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -993,8 +984,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1021,8 +1010,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2499,8 +2487,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2527,8 +2513,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2581,8 +2566,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2609,8 +2592,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2794,8 +2776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2822,8 +2802,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2895,8 +2874,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2923,8 +2900,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers5.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers5.json index 168fadccbb26..7f2721db5724 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers5.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembers5.json @@ -185,8 +185,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -203,8 +201,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersAccessibility.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersAccessibility.json index c2ad4f0792eb..a2ff8fa2db28 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersAccessibility.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersAccessibility.json @@ -153,8 +153,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -171,8 +169,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +251,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1659,8 +1653,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1677,8 +1669,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersNumericNames.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersNumericNames.json index fc970661e117..d2e10d3b23c9 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersNumericNames.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersNumericNames.json @@ -316,8 +316,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -334,8 +332,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -357,8 +354,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -375,8 +370,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -429,8 +423,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -447,8 +439,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -470,8 +461,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -488,8 +477,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -673,8 +661,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -691,8 +677,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -714,8 +699,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -732,8 +715,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -805,8 +787,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -823,8 +803,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -846,8 +825,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -864,8 +841,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersOptionality.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersOptionality.json index 95cdb3aeed78..dfc4d336173f 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersOptionality.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersOptionality.json @@ -315,8 +315,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -343,8 +341,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -469,8 +466,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -497,8 +492,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -658,8 +652,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -686,8 +678,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -740,8 +731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -768,8 +757,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -822,8 +810,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -850,8 +836,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1605,8 +1590,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1633,8 +1616,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1759,8 +1741,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1787,8 +1767,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1922,8 +1901,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1950,8 +1927,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2004,8 +1980,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2032,8 +2006,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2086,8 +2059,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2114,8 +2085,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersOptionality2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersOptionality2.json index ae39e4650238..00e3c513b3a1 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersOptionality2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersOptionality2.json @@ -315,8 +315,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -343,8 +341,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -469,8 +466,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -497,8 +492,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -658,8 +652,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -686,8 +678,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -740,8 +731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -768,8 +757,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -822,8 +810,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -850,8 +836,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1605,8 +1590,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1633,8 +1616,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1759,8 +1741,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1787,8 +1767,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1922,8 +1901,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1950,8 +1927,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2004,8 +1980,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2032,8 +2006,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2086,8 +2059,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2114,8 +2085,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersStringNumericNames.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersStringNumericNames.json index 37d31c339efb..819cdb46be52 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersStringNumericNames.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithObjectMembersStringNumericNames.json @@ -343,8 +343,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -361,8 +359,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -384,8 +381,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -402,8 +397,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -456,8 +450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -474,8 +466,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -497,8 +488,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -515,8 +504,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -700,8 +688,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -718,8 +704,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -741,8 +726,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -759,8 +742,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -832,8 +814,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -850,8 +830,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -873,8 +852,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -891,8 +868,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2095,8 +2071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2113,8 +2087,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2136,8 +2109,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2154,8 +2125,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2208,8 +2178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2226,8 +2194,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2249,8 +2216,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2267,8 +2232,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2452,8 +2416,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2470,8 +2432,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2493,8 +2454,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2511,8 +2470,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2584,8 +2542,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2602,8 +2558,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2625,8 +2580,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2643,8 +2596,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer.json index 4878b974da59..8250c7c87f52 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer2.json index f94c7f18b014..7863122e8d87 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer3.json index 40b23bcc7d3c..14de119310fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer3.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json b/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json index 0a107b4b43d9..d3a7cc126450 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json @@ -134,8 +134,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -152,8 +150,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentLHSIsReference.json b/crates/swc_ecma_parser/tests/tsc/assignmentLHSIsReference.json index 338bb64dd085..d839bc08887a 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentLHSIsReference.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentLHSIsReference.json @@ -313,8 +313,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -331,8 +329,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentToParenthesizedIdentifiers.json b/crates/swc_ecma_parser/tests/tsc/assignmentToParenthesizedIdentifiers.json index b63dc8d2d3fc..376d4c9938f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentToParenthesizedIdentifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentToParenthesizedIdentifiers.json @@ -1730,8 +1730,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1748,8 +1746,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json b/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json index 4e0e56f20d3d..dbc8bbb1a252 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json @@ -1111,8 +1111,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1138,8 +1136,7 @@ "raw": "\"ok\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/augmentedTypeAssignmentCompatIndexSignature.json b/crates/swc_ecma_parser/tests/tsc/augmentedTypeAssignmentCompatIndexSignature.json index 8d712147f1fb..5e50d24b0cae 100644 --- a/crates/swc_ecma_parser/tests/tsc/augmentedTypeAssignmentCompatIndexSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/augmentedTypeAssignmentCompatIndexSignature.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -110,10 +107,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/augmentedTypeBracketAccessIndexSignature.json b/crates/swc_ecma_parser/tests/tsc/augmentedTypeBracketAccessIndexSignature.json index 9f2f68029f9f..917eafc91e58 100644 --- a/crates/swc_ecma_parser/tests/tsc/augmentedTypeBracketAccessIndexSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/augmentedTypeBracketAccessIndexSignature.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -110,10 +107,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es2017.json index b65291ef9cf3..ba85a1e04b1c 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es2017.json @@ -333,8 +333,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -351,8 +349,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es5.json index 9ae26492f323..d0eecdb2b9c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es5.json @@ -333,8 +333,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -351,8 +349,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es6.json index 9518d78c5498..5e96f9986e27 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitBinaryExpression5_es6.json @@ -333,8 +333,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -351,8 +349,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es2017.json index e1d933c32baa..4a018407f97f 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es2017.json @@ -331,7 +331,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es5.json index c0cc3f66610c..90bf759bb6b9 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es5.json @@ -331,7 +331,6 @@ "end": 269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 437, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es6.json index fba0b065ff4f..80928144079f 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression1_es6.json @@ -331,7 +331,6 @@ "end": 241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es2017.json index f4f3d041fbd6..b6a8c5865c05 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es2017.json @@ -331,7 +331,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es5.json index cb8d4de3e953..16f522c82cf2 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es5.json @@ -331,7 +331,6 @@ "end": 269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 437, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es6.json index 49c2eb4fb741..72e8c9224d03 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression2_es6.json @@ -331,7 +331,6 @@ "end": 241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es2017.json index df891820ec68..02087bbb4da3 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es2017.json @@ -331,7 +331,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es5.json index 76a34903e28a..57cef3c558f4 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es5.json @@ -331,7 +331,6 @@ "end": 269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 437, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es6.json index 26961f081e02..f3a0b2fa3efa 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression3_es6.json @@ -331,7 +331,6 @@ "end": 241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es2017.json index e46c86f2b1b1..dd5ad5dd61b4 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es2017.json @@ -331,7 +331,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es5.json index e0c8eeaa15e2..f6cff0f03d32 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es5.json @@ -331,7 +331,6 @@ "end": 269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 437, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es6.json index 6857e5b6c393..3239a954caaf 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression4_es6.json @@ -331,7 +331,6 @@ "end": 241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es2017.json index 349df0371431..ee63f679b2bc 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es2017.json @@ -331,7 +331,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es5.json index d6b4661446cc..29b0d7ae3c47 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es5.json @@ -331,7 +331,6 @@ "end": 269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 437, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es6.json index 3757cd551579..53193c4df717 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression5_es6.json @@ -331,7 +331,6 @@ "end": 241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es2017.json index fad11b065494..84ab9359bef6 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es2017.json @@ -331,7 +331,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es5.json index 19def506173e..38b8920ea410 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es5.json @@ -331,7 +331,6 @@ "end": 269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 437, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es6.json index db394582bf60..d615aba4d50d 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression6_es6.json @@ -331,7 +331,6 @@ "end": 241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es2017.json index 9d026c65c5a3..06e195809d16 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es2017.json @@ -331,7 +331,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es5.json index 1f3021f5ba92..45c3e0eb058a 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es5.json @@ -331,7 +331,6 @@ "end": 269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 437, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es6.json index 9e6d33ebe2b8..e307b80512bf 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression7_es6.json @@ -331,7 +331,6 @@ "end": 241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.json index 6ac60f9e0813..7881689ab159 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es2017.json @@ -331,7 +331,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 412, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es5.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es5.json index 602e10477a42..5a01cf6f6275 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es5.json @@ -331,7 +331,6 @@ "end": 269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 437, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es6.json b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es6.json index e79daf1a3556..d625ab79e944 100644 --- a/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/awaitCallExpression8_es6.json @@ -331,7 +331,6 @@ "end": 241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json index dbaf9c2dca13..e92c6a0c2aa0 100644 --- a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json +++ b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -108,8 +105,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +121,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -240,8 +231,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,8 +247,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfTuple2.json b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfTuple2.json index 706ab20ccd77..1de3957024e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfTuple2.json +++ b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfTuple2.json @@ -84,10 +84,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/bigintMissingES2019.json b/crates/swc_ecma_parser/tests/tsc/bigintMissingES2019.json index a5f58e9f8883..a0c995614589 100644 --- a/crates/swc_ecma_parser/tests/tsc/bigintMissingES2019.json +++ b/crates/swc_ecma_parser/tests/tsc/bigintMissingES2019.json @@ -182,8 +182,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -200,8 +198,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -279,8 +276,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -297,8 +292,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/bigintMissingES2020.json b/crates/swc_ecma_parser/tests/tsc/bigintMissingES2020.json index a5f58e9f8883..a0c995614589 100644 --- a/crates/swc_ecma_parser/tests/tsc/bigintMissingES2020.json +++ b/crates/swc_ecma_parser/tests/tsc/bigintMissingES2020.json @@ -182,8 +182,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -200,8 +198,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -279,8 +276,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -297,8 +292,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/bigintMissingESNext.json b/crates/swc_ecma_parser/tests/tsc/bigintMissingESNext.json index a5f58e9f8883..a0c995614589 100644 --- a/crates/swc_ecma_parser/tests/tsc/bigintMissingESNext.json +++ b/crates/swc_ecma_parser/tests/tsc/bigintMissingESNext.json @@ -182,8 +182,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -200,8 +198,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -279,8 +276,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -297,8 +292,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json b/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json index e5d6ea6f50a3..0182e3a8efbe 100644 --- a/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json +++ b/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json @@ -73,7 +73,6 @@ "end": 141, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes1.json b/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes1.json index de8d4f8ff118..94226099d80a 100644 --- a/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes1.json @@ -3025,8 +3025,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3051,8 +3049,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3074,8 +3071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3092,8 +3087,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -3125,8 +3119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3151,8 +3143,7 @@ "value": false } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3174,8 +3165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3192,8 +3181,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes2.json index 746c1a195756..e17c871d6948 100644 --- a/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/booleanLiteralTypes2.json @@ -3025,8 +3025,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3051,8 +3049,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3074,8 +3071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3092,8 +3087,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -3125,8 +3119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3151,8 +3143,7 @@ "value": false } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3174,8 +3165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3192,8 +3181,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callChain.2.json b/crates/swc_ecma_parser/tests/tsc/callChain.2.json index 150eaf1ae117..d3d9c8dec26e 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChain.2.json +++ b/crates/swc_ecma_parser/tests/tsc/callChain.2.json @@ -215,8 +215,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -251,8 +249,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -390,8 +387,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -458,8 +453,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -476,8 +469,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -495,8 +487,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callChain.3.json b/crates/swc_ecma_parser/tests/tsc/callChain.3.json index e7056c37ba8c..8a05d94afbb8 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChain.3.json +++ b/crates/swc_ecma_parser/tests/tsc/callChain.3.json @@ -146,7 +146,6 @@ "end": 92, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -204,8 +203,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -232,8 +229,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callChain.json b/crates/swc_ecma_parser/tests/tsc/callChain.json index eccd94933c37..4ba922ab1c65 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChain.json +++ b/crates/swc_ecma_parser/tests/tsc/callChain.json @@ -504,8 +504,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -590,8 +588,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1465,8 +1462,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1583,8 +1578,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1601,8 +1594,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1620,8 +1612,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callChainInference.json b/crates/swc_ecma_parser/tests/tsc/callChainInference.json index 8d654f212ec0..72deff394a22 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChainInference.json +++ b/crates/swc_ecma_parser/tests/tsc/callChainInference.json @@ -41,7 +41,6 @@ "end": 95, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -210,8 +209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -228,8 +225,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -251,8 +247,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -269,8 +263,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json index f34ca31895b9..844161a52bae 100644 --- a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json @@ -1894,7 +1894,6 @@ "end": 660, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3015,7 +3014,6 @@ "end": 954, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json index 0a912403a7a3..40c865a06f53 100644 --- a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json @@ -1016,7 +1016,6 @@ "end": 360, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1639,7 +1638,6 @@ "end": 511, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callNonGenericFunctionWithTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/callNonGenericFunctionWithTypeArguments.json index 3b43b686d829..e6d39e5ffcad 100644 --- a/crates/swc_ecma_parser/tests/tsc/callNonGenericFunctionWithTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/callNonGenericFunctionWithTypeArguments.json @@ -832,7 +832,6 @@ "end": 425, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1339,7 +1338,6 @@ "end": 590, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json index 266534d089bc..7bb88c8e4f30 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json @@ -904,8 +904,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -968,8 +966,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -991,8 +988,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1082,8 +1077,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1105,8 +1099,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1211,8 +1203,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1285,8 +1276,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1349,8 +1338,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1372,8 +1360,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1463,8 +1449,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1486,8 +1471,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1592,8 +1575,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1646,8 +1628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1710,8 +1690,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1733,8 +1712,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1849,8 +1826,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1923,8 +1899,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1987,8 +1961,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2061,8 +2034,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2167,8 +2138,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json index 42d39a0a9660..35adf0415b0e 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -441,8 +439,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -464,8 +461,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -536,8 +531,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -559,8 +553,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -623,8 +615,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -646,8 +637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -737,8 +726,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -760,8 +748,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -870,8 +856,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -893,8 +878,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1033,8 +1016,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1056,8 +1038,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1252,8 +1232,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1275,8 +1254,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1564,8 +1541,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1587,8 +1563,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1876,8 +1850,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1899,8 +1872,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2005,8 +1976,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2028,8 +1998,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2089,8 +2057,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2107,8 +2073,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2158,8 +2123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2176,8 +2139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2199,8 +2161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2217,8 +2177,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2254,8 +2213,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2277,8 +2235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2482,8 +2438,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2505,8 +2460,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2710,8 +2663,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2733,8 +2685,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2794,8 +2744,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2812,8 +2760,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2835,8 +2782,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2853,8 +2798,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2890,8 +2834,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2913,8 +2856,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3058,8 +2999,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3081,8 +3021,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3346,8 +3284,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3369,8 +3306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3606,8 +3541,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3629,8 +3563,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4016,8 +3948,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4090,8 +4021,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4214,8 +4143,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4237,8 +4165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4351,8 +4277,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4374,8 +4299,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4490,8 +4413,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4513,8 +4435,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4689,8 +4609,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4712,8 +4631,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4907,8 +4824,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4930,8 +4846,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5161,8 +5075,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5184,8 +5097,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5471,8 +5382,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5494,8 +5404,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5874,8 +5782,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5897,8 +5804,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6075,8 +5980,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6093,8 +5996,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6116,8 +6018,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6134,8 +6034,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6350,8 +6249,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6373,8 +6271,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6529,8 +6425,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6552,8 +6447,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6723,8 +6616,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6746,8 +6638,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7001,8 +6891,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7024,8 +6913,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7251,8 +7138,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7274,8 +7160,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7335,8 +7219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7363,8 +7245,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7386,8 +7267,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7414,8 +7293,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7506,8 +7384,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7529,8 +7406,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7653,8 +7528,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7676,8 +7550,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7808,8 +7680,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7831,8 +7702,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8011,8 +7880,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8034,8 +7902,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8214,8 +8080,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json index 376bb35b49ed..6bfbf90d65ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json @@ -423,8 +423,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -495,8 +493,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -518,8 +515,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -714,8 +709,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -737,8 +731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1026,8 +1018,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1049,8 +1040,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1155,8 +1144,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1178,8 +1166,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1239,8 +1225,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1257,8 +1241,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1308,8 +1291,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1326,8 +1307,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1349,8 +1329,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1367,8 +1345,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1404,8 +1381,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1427,8 +1403,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1632,8 +1606,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1655,8 +1628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1800,8 +1771,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1823,8 +1793,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1884,8 +1852,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1902,8 +1868,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1925,8 +1890,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1943,8 +1906,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1970,8 +1932,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1993,8 +1954,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2360,8 +2319,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2383,8 +2341,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3030,8 +2986,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3104,8 +3059,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3251,8 +3204,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3380,8 +3332,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3472,8 +3422,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3546,8 +3495,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3874,8 +3821,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3948,8 +3894,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4126,8 +4070,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4144,8 +4086,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4360,8 +4301,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4434,8 +4374,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4590,8 +4528,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4664,8 +4601,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4835,8 +4770,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4909,8 +4843,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5164,8 +5096,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5238,8 +5169,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5299,8 +5228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5327,8 +5254,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5350,8 +5276,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5378,8 +5302,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5447,8 +5370,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5521,8 +5443,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5582,8 +5502,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5610,8 +5528,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5633,8 +5550,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5661,8 +5576,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5738,8 +5652,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5812,8 +5725,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5992,8 +5903,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6066,8 +5976,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6236,8 +6144,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6320,8 +6227,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6444,8 +6349,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6518,8 +6422,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6632,8 +6534,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6686,8 +6587,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6800,8 +6699,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6874,8 +6772,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6998,8 +6894,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json index 39f69c5ded94..72a6c585015d 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -493,8 +491,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -516,8 +513,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -630,8 +625,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -653,8 +647,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -759,8 +751,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -782,8 +773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -948,8 +937,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -971,8 +959,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1166,8 +1152,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1189,8 +1174,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1379,8 +1362,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1402,8 +1384,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1463,8 +1443,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1491,8 +1469,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1542,8 +1519,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1570,8 +1545,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1593,8 +1567,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1621,8 +1593,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1690,8 +1661,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1713,8 +1683,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1774,8 +1742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1802,8 +1768,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1825,8 +1790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1853,8 +1816,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1930,8 +1892,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1953,8 +1914,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2014,8 +1973,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2042,8 +1999,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2065,8 +2021,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2093,8 +2047,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2188,8 +2141,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2211,8 +2163,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2608,8 +2558,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2631,8 +2580,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3278,8 +3225,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3352,8 +3298,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3476,8 +3420,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3499,8 +3442,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3613,8 +3554,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3636,8 +3576,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3752,8 +3690,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3775,8 +3712,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3941,8 +3876,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3964,8 +3898,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4159,8 +4091,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4182,8 +4113,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4413,8 +4342,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4436,8 +4364,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4497,8 +4423,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4525,8 +4449,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4576,8 +4499,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4604,8 +4525,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4627,8 +4547,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4655,8 +4573,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4747,8 +4664,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4770,8 +4686,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4831,8 +4745,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4859,8 +4771,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4882,8 +4793,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4910,8 +4819,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5010,8 +4918,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5033,8 +4940,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5094,8 +4999,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5122,8 +5025,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5145,8 +5047,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5173,8 +5073,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5250,8 +5149,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5273,8 +5171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5453,8 +5349,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5476,8 +5371,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5646,8 +5539,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json index 71392eeb132e..2e660ede490d 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -441,8 +439,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -464,8 +461,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -536,8 +531,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -559,8 +553,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -623,8 +615,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -646,8 +637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -737,8 +726,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -760,8 +748,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -870,8 +856,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -893,8 +878,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1033,8 +1016,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1056,8 +1038,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1252,8 +1232,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1275,8 +1254,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1564,8 +1541,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1587,8 +1563,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1876,8 +1850,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1899,8 +1872,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2005,8 +1976,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2028,8 +1998,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2089,8 +2057,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2107,8 +2073,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2158,8 +2123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2176,8 +2139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2199,8 +2161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2217,8 +2177,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2254,8 +2213,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2277,8 +2235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2482,8 +2438,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2505,8 +2460,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2710,8 +2663,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2733,8 +2685,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2794,8 +2744,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2812,8 +2760,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2835,8 +2782,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2853,8 +2798,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2890,8 +2834,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2964,8 +2907,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3088,8 +3029,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3162,8 +3102,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3286,8 +3224,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3309,8 +3246,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3423,8 +3358,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3446,8 +3380,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3562,8 +3494,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3585,8 +3516,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3761,8 +3690,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3784,8 +3712,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3979,8 +3905,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4002,8 +3927,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4233,8 +4156,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4256,8 +4178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4543,8 +4463,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4566,8 +4485,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4946,8 +4863,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4969,8 +4885,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5147,8 +5061,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5165,8 +5077,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5188,8 +5099,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5206,8 +5115,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5422,8 +5330,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5445,8 +5352,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5601,8 +5506,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5624,8 +5528,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5795,8 +5697,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5818,8 +5719,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6073,8 +5972,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6096,8 +5994,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6323,8 +6219,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6346,8 +6241,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6407,8 +6300,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6435,8 +6326,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6458,8 +6348,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6486,8 +6374,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6578,8 +6465,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json index a732209a6d4b..ebed666e10ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -493,8 +491,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -516,8 +513,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -630,8 +625,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -653,8 +647,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -759,8 +751,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -782,8 +773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -948,8 +937,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -971,8 +959,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1166,8 +1152,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1189,8 +1174,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1379,8 +1362,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1402,8 +1384,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1463,8 +1443,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1491,8 +1469,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1542,8 +1519,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1570,8 +1545,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1593,8 +1567,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1621,8 +1593,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1690,8 +1661,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1713,8 +1683,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1774,8 +1742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1802,8 +1768,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1825,8 +1790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1853,8 +1816,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1930,8 +1892,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1953,8 +1914,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2014,8 +1973,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2042,8 +1999,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2065,8 +2021,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2093,8 +2047,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2188,8 +2141,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2294,8 +2246,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2386,8 +2336,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2492,8 +2441,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2574,8 +2521,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2680,8 +2626,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2764,8 +2708,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2870,8 +2813,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3013,8 +2954,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3119,8 +3059,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3291,8 +3229,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3397,8 +3334,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3458,8 +3393,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3486,8 +3419,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3537,8 +3469,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3565,8 +3495,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3588,8 +3517,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3616,8 +3543,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3685,8 +3611,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3791,8 +3716,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3852,8 +3775,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3880,8 +3801,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3903,8 +3823,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3931,8 +3849,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3976,8 +3893,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutAnnotationsOrBody.json b/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutAnnotationsOrBody.json index 75ef781878a0..6a5092384a77 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutAnnotationsOrBody.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutAnnotationsOrBody.json @@ -173,7 +173,6 @@ "end": 181, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -433,7 +432,6 @@ "end": 250, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json b/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json index 33beb5e9a1fc..90d74bb4c0f8 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json @@ -1406,8 +1406,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1424,8 +1422,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2245,8 +2242,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2263,8 +2258,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2317,8 +2311,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2335,8 +2327,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json index 548542343d14..3569276aa0d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json @@ -73,7 +73,6 @@ "end": 215, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json index d18d9380901c..41a9f40be9fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json @@ -1705,7 +1705,6 @@ "end": 799, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1752,7 +1751,6 @@ "end": 837, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1831,7 +1829,6 @@ "end": 870, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2006,7 +2003,6 @@ "end": 912, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2053,7 +2049,6 @@ "end": 959, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json index e483fe7dab13..3f7acde6796d 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json @@ -1705,7 +1705,6 @@ "end": 557, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1752,7 +1751,6 @@ "end": 588, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1831,7 +1829,6 @@ "end": 613, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2006,7 +2003,6 @@ "end": 640, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2053,7 +2049,6 @@ "end": 672, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters.json index d18b45f7f7ca..5abae7474903 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters.json @@ -874,7 +874,6 @@ "end": 345, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1298,7 +1297,6 @@ "end": 441, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters2.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters2.json index c972e754db4d..396729f55703 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters2.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithOptionalParameters2.json @@ -1504,7 +1504,6 @@ "end": 562, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1583,7 +1582,6 @@ "end": 606, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2241,7 +2239,6 @@ "end": 768, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2320,7 +2317,6 @@ "end": 812, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json index 874b2a09030d..1c84a69be7e8 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json @@ -389,7 +389,6 @@ "end": 275, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpread.json b/crates/swc_ecma_parser/tests/tsc/callWithSpread.json index 5d96669a23c0..00b08f09e950 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpread.json @@ -41,7 +41,6 @@ "end": 64, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpread4.json b/crates/swc_ecma_parser/tests/tsc/callWithSpread4.json index 62cb9f1932ca..1cbc14c84a65 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpread4.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpread4.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -124,8 +121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +137,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -195,8 +189,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -213,8 +205,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -236,8 +227,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -254,8 +243,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/callWithSpreadES6.json b/crates/swc_ecma_parser/tests/tsc/callWithSpreadES6.json index d33fa7de9f56..d47d3e076ba5 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithSpreadES6.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithSpreadES6.json @@ -41,7 +41,6 @@ "end": 78, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTag4.json b/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTag4.json index 993ef6a04c68..217e06e2ca08 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTag4.json +++ b/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTag4.json @@ -93,8 +93,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -121,8 +119,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/circularImportAlias.json b/crates/swc_ecma_parser/tests/tsc/circularImportAlias.json index 36b1ef21df87..44a2b1d220dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/circularImportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/circularImportAlias.json @@ -374,8 +374,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -392,8 +390,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/circularIndexedAccessErrors.json b/crates/swc_ecma_parser/tests/tsc/circularIndexedAccessErrors.json index 8bf9ee81065f..3478a9d57755 100644 --- a/crates/swc_ecma_parser/tests/tsc/circularIndexedAccessErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/circularIndexedAccessErrors.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -108,8 +106,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -238,8 +235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -322,8 +317,7 @@ "typeParams": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -345,8 +339,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -363,8 +355,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -641,8 +632,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -696,8 +685,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -828,8 +816,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -911,8 +897,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1314,8 +1299,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1332,8 +1315,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/circularTypeAliasForUnionWithInterface.json b/crates/swc_ecma_parser/tests/tsc/circularTypeAliasForUnionWithInterface.json index aa6341dbed97..8f37a9718fa0 100644 --- a/crates/swc_ecma_parser/tests/tsc/circularTypeAliasForUnionWithInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/circularTypeAliasForUnionWithInterface.json @@ -171,8 +171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -199,8 +197,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/circularTypeofWithVarOrFunc.json b/crates/swc_ecma_parser/tests/tsc/circularTypeofWithVarOrFunc.json index 0647aadf9cb0..407b8ec5fd08 100644 --- a/crates/swc_ecma_parser/tests/tsc/circularTypeofWithVarOrFunc.json +++ b/crates/swc_ecma_parser/tests/tsc/circularTypeofWithVarOrFunc.json @@ -418,8 +418,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -436,8 +434,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -459,8 +456,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -477,8 +472,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/classAbstractClinterfaceAssignability.json b/crates/swc_ecma_parser/tests/tsc/classAbstractClinterfaceAssignability.json index da82e97bcf2d..d0413cbb87da 100644 --- a/crates/swc_ecma_parser/tests/tsc/classAbstractClinterfaceAssignability.json +++ b/crates/swc_ecma_parser/tests/tsc/classAbstractClinterfaceAssignability.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -163,8 +160,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -181,8 +176,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -204,8 +198,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -232,8 +224,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/classAndInterfaceMergeConflictingMembers.json b/crates/swc_ecma_parser/tests/tsc/classAndInterfaceMergeConflictingMembers.json index 18600193d678..57fdfdf76e42 100644 --- a/crates/swc_ecma_parser/tests/tsc/classAndInterfaceMergeConflictingMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/classAndInterfaceMergeConflictingMembers.json @@ -126,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -270,8 +267,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -288,8 +283,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -414,8 +408,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -432,8 +424,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/classAndInterfaceWithSameName.json b/crates/swc_ecma_parser/tests/tsc/classAndInterfaceWithSameName.json index caa3bc315fd1..a95ee27fee8d 100644 --- a/crates/swc_ecma_parser/tests/tsc/classAndInterfaceWithSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/classAndInterfaceWithSameName.json @@ -126,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +142,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -297,8 +294,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -315,8 +310,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json b/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json index d02999e836cf..bd65fe259227 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json @@ -109,8 +109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -137,8 +135,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -160,8 +157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -188,8 +183,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/classImplementsMergedClassInterface.json b/crates/swc_ecma_parser/tests/tsc/classImplementsMergedClassInterface.json index d50fdf1051b2..41f763fd5d73 100644 --- a/crates/swc_ecma_parser/tests/tsc/classImplementsMergedClassInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/classImplementsMergedClassInterface.json @@ -126,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/classIsSubtypeOfBaseType.json b/crates/swc_ecma_parser/tests/tsc/classIsSubtypeOfBaseType.json index 0f805d78269a..8788b8ee040a 100644 --- a/crates/swc_ecma_parser/tests/tsc/classIsSubtypeOfBaseType.json +++ b/crates/swc_ecma_parser/tests/tsc/classIsSubtypeOfBaseType.json @@ -193,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -211,8 +209,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -234,8 +231,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -252,8 +247,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -317,8 +311,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -335,8 +327,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -417,8 +408,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -435,8 +424,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -500,8 +488,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -518,8 +504,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/classStaticBlock17.json b/crates/swc_ecma_parser/tests/tsc/classStaticBlock17.json index b2417f7ea53a..3644c6507400 100644 --- a/crates/swc_ecma_parser/tests/tsc/classStaticBlock17.json +++ b/crates/swc_ecma_parser/tests/tsc/classStaticBlock17.json @@ -54,7 +54,6 @@ "end": 55, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -132,7 +131,6 @@ "end": 83, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface.json b/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface.json index a51dc3d52c58..6afface562e0 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface.json @@ -551,8 +551,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -569,8 +567,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -579,7 +576,6 @@ "end": 300, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -660,8 +656,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -678,8 +672,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -833,8 +826,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -851,8 +842,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface2.json b/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface2.json index 2f99df5ed616..a28638895c92 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface2.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithOnlyPublicMembersEquivalentToInterface2.json @@ -596,8 +596,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -614,8 +612,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -624,7 +621,6 @@ "end": 362, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -705,8 +701,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -723,8 +717,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -878,8 +871,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -896,8 +887,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/commonJSImportNotAsPrimaryExpression.json b/crates/swc_ecma_parser/tests/tsc/commonJSImportNotAsPrimaryExpression.json index 93d1b33ed0f2..6af896a311dd 100644 --- a/crates/swc_ecma_parser/tests/tsc/commonJSImportNotAsPrimaryExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/commonJSImportNotAsPrimaryExpression.json @@ -171,8 +171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +187,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -212,8 +209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -230,8 +225,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -326,8 +320,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -344,8 +336,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -706,8 +697,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -724,8 +713,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/commonTypeIntersection.json b/crates/swc_ecma_parser/tests/tsc/commonTypeIntersection.json index c8e6de2b3cea..54db98520247 100644 --- a/crates/swc_ecma_parser/tests/tsc/commonTypeIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/commonTypeIntersection.json @@ -75,8 +75,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -102,8 +100,7 @@ "raw": "'TypeTwo'" } } - }, - "typeParams": null + } } ] }, @@ -135,8 +132,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -153,8 +148,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -236,8 +230,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -263,8 +255,7 @@ "raw": "'TypeOne'" } } - }, - "typeParams": null + } } ] }, @@ -296,8 +287,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -314,8 +303,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -406,8 +394,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -433,8 +419,7 @@ "raw": "'TypeTwo'" } } - }, - "typeParams": null + } } ] }, @@ -525,8 +510,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -552,8 +535,7 @@ "raw": "'TypeOne'" } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalObjects.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalObjects.json index 5ee68e0aea4e..4874320fd403 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalObjects.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalObjects.json @@ -1055,7 +1055,6 @@ "end": 558, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1154,7 +1153,6 @@ "end": 597, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIntersectionType.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIntersectionType.json index 2928caef90b1..ace79acb6cf8 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIntersectionType.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIntersectionType.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -94,8 +92,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] } @@ -212,8 +209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -239,8 +234,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] }, @@ -272,8 +266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -290,8 +282,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json index 15961c5f7485..d08754c421ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json @@ -279,7 +279,6 @@ "end": 148, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -466,7 +465,6 @@ "end": 219, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -611,7 +609,6 @@ "end": 252, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -729,7 +726,6 @@ "end": 295, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -884,7 +880,6 @@ "end": 338, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1049,7 +1044,6 @@ "end": 363, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1149,7 +1143,6 @@ "end": 384, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1249,7 +1242,6 @@ "end": 417, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1377,7 +1369,6 @@ "end": 446, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1505,7 +1496,6 @@ "end": 483, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1655,7 +1645,6 @@ "end": 516, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1805,7 +1794,6 @@ "end": 545, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1975,7 +1963,6 @@ "end": 575, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json index 3a4393025a19..264f41154563 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json @@ -279,7 +279,6 @@ "end": 148, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json index e81b3df34df7..0cd4dda852fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json @@ -279,7 +279,6 @@ "end": 152, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -449,7 +448,6 @@ "end": 178, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -539,7 +537,6 @@ "end": 207, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -709,7 +706,6 @@ "end": 242, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -827,7 +823,6 @@ "end": 272, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -997,7 +992,6 @@ "end": 308, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1115,7 +1109,6 @@ "end": 342, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1307,7 +1300,6 @@ "end": 382, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1447,7 +1439,6 @@ "end": 417, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1654,7 +1645,6 @@ "end": 463, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1799,7 +1789,6 @@ "end": 511, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2047,7 +2036,6 @@ "end": 548, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.json index c73429b8ec79..9a2cd6f1bca3 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnOptionalProperty.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json index f06c7ba53aad..34bb494fc3e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json @@ -401,8 +401,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -419,8 +417,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNumericLiteral.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNumericLiteral.json index 1c35dc6f737e..cb0260bbafe5 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNumericLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNumericLiteral.json @@ -70,8 +70,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -88,8 +86,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnCallSignature.json index 1a05f72a71e4..0672c4ca9e9e 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnCallSignature.json @@ -207,7 +207,6 @@ "end": 113, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -297,7 +296,6 @@ "end": 137, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -387,7 +385,6 @@ "end": 182, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -532,7 +529,6 @@ "end": 226, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -677,7 +673,6 @@ "end": 271, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -822,7 +817,6 @@ "end": 304, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -940,7 +934,6 @@ "end": 349, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1085,7 +1078,6 @@ "end": 373, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1175,7 +1167,6 @@ "end": 405, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1303,7 +1294,6 @@ "end": 439, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1431,7 +1421,6 @@ "end": 483, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1596,7 +1585,6 @@ "end": 526, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1761,7 +1749,6 @@ "end": 551, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1851,7 +1838,6 @@ "end": 575, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1951,7 +1937,6 @@ "end": 600, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2051,7 +2036,6 @@ "end": 624, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2151,7 +2135,6 @@ "end": 649, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2251,7 +2234,6 @@ "end": 676, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2351,7 +2333,6 @@ "end": 710, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2479,7 +2460,6 @@ "end": 746, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2607,7 +2587,6 @@ "end": 784, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2757,7 +2736,6 @@ "end": 824, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json index 5be00095742e..78168b9fde75 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json @@ -207,7 +207,6 @@ "end": 117, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -377,7 +376,6 @@ "end": 152, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -495,7 +493,6 @@ "end": 181, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -665,7 +662,6 @@ "end": 227, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -810,7 +806,6 @@ "end": 265, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1040,7 +1035,6 @@ "end": 311, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1185,7 +1179,6 @@ "end": 341, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1355,7 +1348,6 @@ "end": 377, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1473,7 +1465,6 @@ "end": 411, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1665,7 +1656,6 @@ "end": 451, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1805,7 +1795,6 @@ "end": 486, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2012,7 +2001,6 @@ "end": 528, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2157,7 +2145,6 @@ "end": 621, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnOptionalProperty.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnOptionalProperty.json index 92283364d05d..cc7776d1717f 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnOptionalProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnOptionalProperty.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -167,8 +161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -185,8 +177,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/compoundAdditionAssignmentLHSCannotBeAssigned.json b/crates/swc_ecma_parser/tests/tsc/compoundAdditionAssignmentLHSCannotBeAssigned.json index f58694a3c0f1..46bd8fde0270 100644 --- a/crates/swc_ecma_parser/tests/tsc/compoundAdditionAssignmentLHSCannotBeAssigned.json +++ b/crates/swc_ecma_parser/tests/tsc/compoundAdditionAssignmentLHSCannotBeAssigned.json @@ -417,8 +417,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -435,8 +433,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.json b/crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.json index 5c1062a24c7d..6c6a2461e878 100644 --- a/crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.json +++ b/crates/swc_ecma_parser/tests/tsc/compoundAssignmentLHSIsReference.json @@ -373,8 +373,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -391,8 +389,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.json b/crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.json index b41660d84a18..7b8cdf6cbaf0 100644 --- a/crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.json +++ b/crates/swc_ecma_parser/tests/tsc/compoundExponentiationAssignmentLHSIsReference.json @@ -313,8 +313,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -331,8 +329,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json index 004278310864..0a309d51d4d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json @@ -2387,8 +2387,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2424,8 +2422,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -2490,8 +2487,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2517,8 +2512,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2540,8 +2534,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2558,8 +2550,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -2591,8 +2582,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2618,8 +2607,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2641,8 +2629,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2659,8 +2645,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2692,8 +2677,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2719,8 +2702,7 @@ "raw": "\"c\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2742,8 +2724,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2760,8 +2740,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -2859,8 +2838,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2914,8 +2891,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3014,8 +2990,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3069,8 +3043,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3177,8 +3150,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3204,8 +3175,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } } ] }, @@ -3237,8 +3207,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3264,8 +3232,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -3374,8 +3341,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3401,8 +3366,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } } ] }, @@ -3434,8 +3398,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3461,8 +3423,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -3563,8 +3524,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3590,8 +3549,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } } ] } @@ -3690,8 +3648,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3717,8 +3673,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } } ] } @@ -3957,8 +3912,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3985,8 +3938,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4229,8 +4181,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4257,8 +4207,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5482,8 +5431,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5510,8 +5457,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5595,8 +5541,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5623,8 +5567,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6073,8 +6016,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6091,8 +6032,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6114,8 +6054,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6132,8 +6070,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6155,8 +6092,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6181,8 +6116,7 @@ "kind": "string" } } - }, - "typeParams": null + } } ] } @@ -6302,8 +6236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6320,8 +6252,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6343,8 +6274,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6361,8 +6290,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6384,8 +6312,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6420,8 +6346,7 @@ "typeParams": null } } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -6430,7 +6355,6 @@ "end": 3027, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11380,8 +11304,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11398,8 +11320,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11421,8 +11342,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11439,8 +11358,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -11581,8 +11499,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11599,8 +11515,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -11658,8 +11573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11676,8 +11589,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -11854,8 +11766,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11872,8 +11782,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -11931,8 +11840,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11949,8 +11856,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -12162,8 +12068,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12180,8 +12084,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -12277,8 +12180,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12295,8 +12196,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -22997,8 +22897,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -23015,8 +22913,7 @@ }, "kind": "void" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -23038,8 +22935,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -23056,8 +22951,7 @@ }, "kind": "never" } - }, - "typeParams": null + } } ] } @@ -23137,8 +23031,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -23155,8 +23047,7 @@ }, "kind": "void" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -23178,8 +23069,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -23196,8 +23085,7 @@ }, "kind": "never" } - }, - "typeParams": null + } } ] } @@ -23762,8 +23650,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -23789,8 +23675,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } } ] } @@ -23863,8 +23748,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -23890,8 +23773,7 @@ "raw": "'b'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -23913,8 +23795,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -23995,8 +23875,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -24069,8 +23948,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24096,8 +23973,7 @@ "raw": "'b'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -24119,8 +23995,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24201,8 +24075,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -24679,8 +24552,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24706,8 +24577,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -24729,8 +24599,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24756,8 +24624,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -24779,8 +24646,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24806,8 +24671,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -24887,8 +24751,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24914,8 +24776,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -24937,8 +24798,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24964,8 +24823,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -24987,8 +24845,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -25014,8 +24870,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -25071,8 +24926,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -25089,8 +24942,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -25143,8 +24995,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -25161,8 +25011,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json index 44ce9a284e7d..ff6db924e71d 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +157,7 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } @@ -245,8 +242,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -327,8 +322,7 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } @@ -413,8 +407,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -505,8 +497,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -2760,8 +2751,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2778,8 +2767,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2831,8 +2819,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2849,8 +2835,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2921,8 +2906,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2939,8 +2922,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2962,8 +2944,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2980,8 +2960,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3083,8 +3062,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3101,8 +3078,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3124,8 +3100,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3142,8 +3116,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -4804,7 +4777,6 @@ "end": 1929, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6255,8 +6227,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6339,8 +6309,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -6473,8 +6442,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6557,8 +6524,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6580,8 +6546,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6659,8 +6623,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -9792,8 +9755,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9810,8 +9771,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] }, @@ -9999,8 +9959,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10017,8 +9975,7 @@ }, "kind": "never" } - }, - "typeParams": null + } } ] } @@ -10098,8 +10055,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10124,8 +10079,7 @@ "value": false } } - }, - "typeParams": null + } } ] } @@ -10205,8 +10159,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10231,8 +10183,7 @@ "value": true } } - }, - "typeParams": null + } } ] } @@ -10312,8 +10263,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10330,8 +10279,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -10525,8 +10473,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10553,8 +10499,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -10576,8 +10521,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10604,8 +10547,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -11497,8 +11439,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11525,8 +11465,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -11853,8 +11792,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11881,8 +11818,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -12325,8 +12261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12343,8 +12277,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -13137,8 +13070,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13155,8 +13086,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -13300,7 +13230,6 @@ "end": 5369, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -13404,7 +13333,6 @@ "end": 5468, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -14505,8 +14433,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14533,8 +14459,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -14566,8 +14491,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14594,8 +14517,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -14737,8 +14659,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14774,8 +14694,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14801,8 +14719,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14824,8 +14741,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14851,13 +14766,11 @@ "raw": "1" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] }, @@ -14889,8 +14802,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14968,8 +14879,7 @@ } } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json index d33ba2d009df..df2bfed7a7d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json @@ -93,8 +93,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -111,8 +109,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -186,8 +183,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -214,8 +209,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -247,8 +241,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -265,8 +257,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json index d6aa053b816a..b19feee9810d 100644 --- a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json +++ b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json @@ -331,8 +331,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -349,8 +347,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -1492,8 +1489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1510,8 +1505,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json index c044bdaa38ed..5aa5bd47a51c 100644 --- a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json +++ b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json @@ -628,8 +628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -656,8 +654,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1331,8 +1328,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1359,8 +1354,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json index ebfee3bb9302..205b4fd61685 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json @@ -807,8 +807,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -872,8 +870,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -895,8 +892,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -987,8 +982,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1010,8 +1004,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1117,8 +1109,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1334,8 +1325,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1399,8 +1388,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1422,8 +1410,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1514,8 +1500,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1537,8 +1522,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1644,8 +1627,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1698,8 +1680,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1763,8 +1743,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1786,8 +1765,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1903,8 +1880,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1977,8 +1953,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2042,8 +2016,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2116,8 +2089,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2223,8 +2194,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json index a0c7a1f92299..4d84bb5acdf6 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -442,8 +440,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -465,8 +462,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -538,8 +533,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -561,8 +555,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -626,8 +618,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -649,8 +640,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -741,8 +730,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -764,8 +752,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -875,8 +861,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -898,8 +883,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1039,8 +1022,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1062,8 +1044,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1259,8 +1239,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1282,8 +1261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1572,8 +1549,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1595,8 +1571,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1885,8 +1859,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1908,8 +1881,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2015,8 +1986,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2038,8 +2008,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2099,8 +2067,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2117,8 +2083,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2168,8 +2133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2186,8 +2149,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2209,8 +2171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2227,8 +2187,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2265,8 +2224,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2288,8 +2246,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2494,8 +2450,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2517,8 +2472,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2723,8 +2676,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2746,8 +2698,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2807,8 +2757,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2825,8 +2773,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2848,8 +2795,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2866,8 +2811,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2904,8 +2848,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2927,8 +2870,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3072,8 +3013,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3095,8 +3035,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3360,8 +3298,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3383,8 +3320,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3622,8 +3557,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3645,8 +3579,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4032,8 +3964,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4106,8 +4037,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4231,8 +4160,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4254,8 +4182,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4369,8 +4295,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4392,8 +4317,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4509,8 +4432,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4532,8 +4454,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4709,8 +4629,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4732,8 +4651,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4928,8 +4845,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4951,8 +4867,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5183,8 +5097,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5206,8 +5119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5494,8 +5405,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5517,8 +5427,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5898,8 +5806,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5921,8 +5828,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6099,8 +6004,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6117,8 +6020,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6140,8 +6042,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6158,8 +6058,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6375,8 +6274,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6398,8 +6296,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6555,8 +6451,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6578,8 +6473,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6750,8 +6643,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6773,8 +6665,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7029,8 +6919,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7052,8 +6941,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7280,8 +7167,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7303,8 +7189,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7364,8 +7248,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7392,8 +7274,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7415,8 +7296,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7443,8 +7322,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7536,8 +7414,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7559,8 +7436,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7684,8 +7559,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7707,8 +7581,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7840,8 +7712,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7863,8 +7734,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8045,8 +7914,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8068,8 +7936,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8250,8 +8116,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json index c2ba517ca78e..f49322319e96 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json @@ -423,8 +423,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -496,8 +494,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -519,8 +516,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -716,8 +711,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -739,8 +733,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1029,8 +1021,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1052,8 +1043,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1159,8 +1148,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1182,8 +1170,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1243,8 +1229,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1261,8 +1245,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1312,8 +1295,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1330,8 +1311,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1353,8 +1333,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1371,8 +1349,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1409,8 +1386,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1432,8 +1408,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1638,8 +1612,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1661,8 +1634,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1806,8 +1777,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1829,8 +1799,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1890,8 +1858,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1908,8 +1874,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1931,8 +1896,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1949,8 +1912,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1977,8 +1939,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2000,8 +1961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2367,8 +2326,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2441,8 +2399,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2589,8 +2545,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2718,8 +2673,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2811,8 +2764,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2885,8 +2837,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3214,8 +3164,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3288,8 +3237,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3466,8 +3413,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3484,8 +3429,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3701,8 +3645,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3775,8 +3718,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3932,8 +3873,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -4006,8 +3946,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4178,8 +4116,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -4252,8 +4189,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4508,8 +4443,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -4582,8 +4516,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4643,8 +4575,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4671,8 +4601,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4694,8 +4623,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4722,8 +4649,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4792,8 +4718,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -4866,8 +4791,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4927,8 +4850,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4955,8 +4876,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4978,8 +4898,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5006,8 +4924,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5084,8 +5001,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -5158,8 +5074,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5340,8 +5254,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -5424,8 +5337,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5549,8 +5460,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -5623,8 +5533,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5738,8 +5646,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -5792,8 +5699,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5907,8 +5812,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -5981,8 +5885,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6106,8 +6008,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -6160,8 +6061,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6425,8 +6324,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -6499,8 +6397,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6632,8 +6528,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json index 9ac8d2d97557..77ef92fef473 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -494,8 +492,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -517,8 +514,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -632,8 +627,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -655,8 +649,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -762,8 +754,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -785,8 +776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -952,8 +941,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -975,8 +963,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1171,8 +1157,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1194,8 +1179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1385,8 +1368,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1408,8 +1390,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1469,8 +1449,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1497,8 +1475,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1548,8 +1525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1576,8 +1551,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1599,8 +1573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1627,8 +1599,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1697,8 +1668,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1720,8 +1690,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1781,8 +1749,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1809,8 +1775,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1832,8 +1797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1860,8 +1823,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1938,8 +1900,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1961,8 +1922,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2022,8 +1981,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2050,8 +2007,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2073,8 +2029,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2101,8 +2055,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2197,8 +2150,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2220,8 +2172,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2505,8 +2455,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2528,8 +2477,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2793,8 +2740,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2816,8 +2762,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3215,8 +3159,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3238,8 +3181,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3885,8 +3826,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3959,8 +3899,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4084,8 +4022,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4107,8 +4044,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4222,8 +4157,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4245,8 +4179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4362,8 +4294,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4385,8 +4316,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4552,8 +4481,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4575,8 +4503,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4771,8 +4697,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4794,8 +4719,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5026,8 +4949,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5049,8 +4971,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5110,8 +5030,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5138,8 +5056,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5189,8 +5106,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5217,8 +5132,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5240,8 +5154,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5268,8 +5180,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5361,8 +5272,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5384,8 +5294,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5445,8 +5353,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5473,8 +5379,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5496,8 +5401,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5524,8 +5427,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5625,8 +5527,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5648,8 +5549,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5709,8 +5608,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5737,8 +5634,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5760,8 +5656,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5788,8 +5682,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5866,8 +5759,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5889,8 +5781,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6032,8 +5922,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6055,8 +5944,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6188,8 +6075,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6211,8 +6097,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6411,8 +6295,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6434,8 +6317,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6624,8 +6505,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json index f9885758a414..0720e8eba086 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -442,8 +440,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -465,8 +462,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -538,8 +533,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -561,8 +555,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -626,8 +618,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -649,8 +640,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -741,8 +730,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -764,8 +752,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -875,8 +861,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -898,8 +883,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1039,8 +1022,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1062,8 +1044,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1259,8 +1239,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1282,8 +1261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1572,8 +1549,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1595,8 +1571,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1885,8 +1859,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1908,8 +1881,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2015,8 +1986,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2038,8 +2008,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2099,8 +2067,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2117,8 +2083,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2168,8 +2133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2186,8 +2149,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2209,8 +2171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2227,8 +2187,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2265,8 +2224,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2288,8 +2246,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2494,8 +2450,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2517,8 +2472,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2723,8 +2676,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2746,8 +2698,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2807,8 +2757,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2825,8 +2773,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2848,8 +2795,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2866,8 +2811,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2904,8 +2848,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2978,8 +2921,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3103,8 +3044,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3177,8 +3117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3302,8 +3240,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3325,8 +3262,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3440,8 +3375,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3463,8 +3397,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3580,8 +3512,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3603,8 +3534,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3780,8 +3709,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3803,8 +3731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3999,8 +3925,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4022,8 +3947,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4254,8 +4177,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4277,8 +4199,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4565,8 +4485,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4588,8 +4507,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4969,8 +4886,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4992,8 +4908,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5170,8 +5084,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5188,8 +5100,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5211,8 +5122,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5229,8 +5138,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5446,8 +5354,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5469,8 +5376,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5626,8 +5531,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5649,8 +5553,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5821,8 +5723,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5844,8 +5745,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6100,8 +5999,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6123,8 +6021,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6351,8 +6247,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6374,8 +6269,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6435,8 +6328,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6463,8 +6354,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6486,8 +6376,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6514,8 +6402,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6607,8 +6494,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json index c65bf11dff80..95a70b497d95 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -494,8 +492,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -517,8 +514,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -632,8 +627,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -655,8 +649,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -762,8 +754,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -785,8 +776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -952,8 +941,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -975,8 +963,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1171,8 +1157,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1194,8 +1179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1385,8 +1368,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1408,8 +1390,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1469,8 +1449,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1497,8 +1475,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1548,8 +1525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1576,8 +1551,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1599,8 +1573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1627,8 +1599,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1697,8 +1668,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1720,8 +1690,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1781,8 +1749,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1809,8 +1775,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1832,8 +1797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1860,8 +1823,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1938,8 +1900,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1961,8 +1922,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2022,8 +1981,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2050,8 +2007,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2073,8 +2029,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2101,8 +2055,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2197,8 +2150,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2303,8 +2255,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2396,8 +2346,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2502,8 +2451,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2585,8 +2532,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2691,8 +2637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2776,8 +2720,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2882,8 +2825,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3026,8 +2967,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3132,8 +3072,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3305,8 +3243,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3411,8 +3348,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3472,8 +3407,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3500,8 +3433,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3551,8 +3483,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3579,8 +3509,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3602,8 +3531,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3630,8 +3557,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3700,8 +3626,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3806,8 +3731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3867,8 +3790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3895,8 +3816,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3918,8 +3838,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3946,8 +3864,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3992,8 +3909,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType.json b/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType.json index 3b945dba1dbd..bb5c05c092ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType.json @@ -79,8 +79,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -107,8 +105,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -203,8 +200,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -221,8 +216,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -326,8 +320,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -344,8 +336,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType2.json b/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType2.json index 49fc296fed54..6f7545723647 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorFunctionTypeIsAssignableToBaseType2.json @@ -79,8 +79,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -107,8 +105,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -280,8 +277,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -298,8 +293,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -511,8 +505,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -529,8 +521,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualIntersectionType.json b/crates/swc_ecma_parser/tests/tsc/contextualIntersectionType.json index 3a8c6cac34ad..7593a0582c4e 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualIntersectionType.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualIntersectionType.json @@ -75,8 +75,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -139,8 +137,7 @@ } } } - }, - "typeParams": null + } } ] }, @@ -172,8 +169,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +231,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualThisType.json b/crates/swc_ecma_parser/tests/tsc/contextualThisType.json index f5153365d0c3..fed9d60c1afe 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualThisType.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualThisType.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -116,8 +114,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeTupleEnd.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeTupleEnd.json index 7fffc20fa9de..ebe75eed1af7 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeTupleEnd.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeTupleEnd.json @@ -1873,8 +1873,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1900,8 +1898,7 @@ "raw": "\"foo\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1923,8 +1920,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1950,8 +1945,7 @@ "raw": "42" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithTuple.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithTuple.json index 379b86081e64..91319021a04b 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithTuple.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithTuple.json @@ -488,8 +488,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -506,8 +504,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2151,8 +2148,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2178,8 +2173,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] } @@ -2377,8 +2371,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2395,8 +2387,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeCallSignatures.json index 2370d927bd55..a25a0e9c7694 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeCallSignatures.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeIndexSignatures.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeIndexSignatures.json index 5c9cfa821171..323e31b905ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeIndexSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeIndexSignatures.json @@ -226,8 +226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -244,8 +242,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -298,8 +295,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -316,8 +311,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json index 485cb3ce7582..1b9127ec6473 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json @@ -73,7 +73,6 @@ "end": 260, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -154,8 +153,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -172,8 +169,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -182,7 +178,6 @@ "end": 336, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -270,7 +265,6 @@ "end": 376, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -351,8 +345,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -369,8 +361,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -442,7 +433,6 @@ "end": 467, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -523,8 +513,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -541,8 +529,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -551,7 +538,6 @@ "end": 543, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -639,7 +625,6 @@ "end": 583, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -720,8 +705,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -738,8 +721,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3106,7 +3088,6 @@ "end": 2462, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3214,8 +3195,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3232,8 +3211,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3273,7 +3251,6 @@ "end": 2588, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3381,8 +3358,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3399,8 +3374,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeObjectLiteral.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeObjectLiteral.json index 0d5d4377cf5f..1d472e84154f 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeObjectLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeObjectLiteral.json @@ -261,8 +261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -279,8 +277,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -352,8 +349,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -370,8 +365,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -451,8 +445,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -469,8 +461,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -502,8 +493,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -520,8 +509,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -623,8 +611,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -660,8 +646,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -769,8 +754,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -787,8 +770,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -820,8 +802,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -838,8 +818,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -945,8 +924,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -982,8 +959,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1095,8 +1071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1113,8 +1087,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1136,8 +1109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1154,8 +1125,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1187,8 +1157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1205,8 +1173,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1320,8 +1287,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1338,8 +1303,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1361,8 +1325,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1379,8 +1341,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1412,8 +1373,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1430,8 +1389,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1568,8 +1526,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1586,8 +1542,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1609,8 +1564,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1627,8 +1580,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1660,8 +1612,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1678,8 +1628,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1701,8 +1650,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1719,8 +1666,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1857,8 +1803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1875,8 +1819,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1898,8 +1841,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1916,8 +1857,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1949,8 +1889,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1967,8 +1905,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1990,8 +1927,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2008,8 +1943,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2135,7 +2069,6 @@ "end": 1527, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2261,7 +2194,6 @@ "end": 1612, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionAwaitOperand.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionAwaitOperand.json index fea5f7197d83..6cf17d2c0844 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionAwaitOperand.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionAwaitOperand.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -81,8 +79,7 @@ "raw": "\"value\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionReturnType.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionReturnType.json index f1e7d4395baa..493e6d0c0d3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypeAsyncFunctionReturnType.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -81,8 +79,7 @@ "raw": "\"value\"" } } - }, - "typeParams": null + } } ] } @@ -1623,8 +1620,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1641,8 +1636,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1664,8 +1658,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1682,8 +1674,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1705,8 +1696,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1723,8 +1712,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1746,8 +1734,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1764,8 +1750,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1787,8 +1772,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1823,8 +1806,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -2414,8 +2396,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2432,8 +2412,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2455,8 +2434,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2492,8 +2469,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2545,8 +2521,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2563,8 +2537,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json index 348c1723a9bd..7e46fd0f4afe 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializer.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -118,8 +116,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -698,8 +695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -726,8 +721,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -967,8 +961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1022,8 +1014,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1213,8 +1204,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1268,8 +1257,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1420,7 +1408,6 @@ "end": 626, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json index 0bcaca3d2c18..12026703d4cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedBindingInitializerNegative.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -118,8 +116,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -627,8 +624,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -655,8 +650,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -868,7 +862,6 @@ "end": 411, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1182,8 +1175,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1237,8 +1228,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1428,8 +1418,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1483,8 +1471,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration01.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration01.json index 226ac5d86efa..c5a9e2b7977f 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration01.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration01.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -185,7 +179,6 @@ "end": 145, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -263,7 +256,6 @@ "end": 172, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration02.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration02.json index afd4e9c84eff..7ea715ddc560 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration02.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedClassExpressionMethodDeclaration02.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -253,7 +247,6 @@ "end": 181, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -331,7 +324,6 @@ "end": 208, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedObjectLiteralMethodDeclaration01.json b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedObjectLiteralMethodDeclaration01.json index 9bf8131f9bfb..6b1b9586c547 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextuallyTypedObjectLiteralMethodDeclaration01.json +++ b/crates/swc_ecma_parser/tests/tsc/contextuallyTypedObjectLiteralMethodDeclaration01.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -185,7 +179,6 @@ "end": 145, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -263,7 +256,6 @@ "end": 172, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowAliasing.json b/crates/swc_ecma_parser/tests/tsc/controlFlowAliasing.json index f288c34f2ccc..8b92d7ad96b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowAliasing.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowAliasing.json @@ -1764,8 +1764,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1801,8 +1799,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2090,8 +2087,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2127,8 +2122,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3192,8 +3186,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3219,8 +3211,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3242,8 +3233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3260,8 +3249,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -3293,8 +3281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3320,8 +3306,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3343,8 +3328,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3361,8 +3344,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3656,8 +3638,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3683,8 +3663,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3706,8 +3685,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3724,8 +3701,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -3757,8 +3733,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3784,8 +3758,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3807,8 +3780,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3825,8 +3796,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4136,8 +4106,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4163,8 +4131,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4186,8 +4153,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4204,8 +4169,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -4237,8 +4201,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4264,8 +4226,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4287,8 +4248,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4305,8 +4264,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4600,8 +4558,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4627,8 +4583,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4650,8 +4605,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4668,8 +4621,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -4701,8 +4653,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4728,8 +4678,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4751,8 +4700,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4769,8 +4716,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5102,8 +5048,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5129,8 +5073,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5152,8 +5095,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5170,8 +5111,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -5203,8 +5143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5230,8 +5168,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5253,8 +5190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5271,8 +5206,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5608,8 +5542,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5635,8 +5567,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5658,8 +5589,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5676,8 +5605,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -5709,8 +5637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5736,8 +5662,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5759,8 +5684,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5777,8 +5700,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6106,8 +6028,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6151,8 +6071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6178,8 +6096,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6201,8 +6118,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6219,8 +6134,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -6252,8 +6166,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6279,8 +6191,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6302,8 +6213,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6320,15 +6229,13 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } ] } - }, - "typeParams": null + } } ] } @@ -6666,8 +6573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6711,8 +6616,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6738,8 +6641,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6761,8 +6663,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6779,8 +6679,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -6812,8 +6711,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6839,8 +6736,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6862,8 +6758,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6880,15 +6774,13 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } ] } - }, - "typeParams": null + } } ] } @@ -7234,8 +7126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7261,8 +7151,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7284,8 +7173,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7302,8 +7189,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -7335,8 +7221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7362,8 +7246,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7385,8 +7268,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7403,8 +7284,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7835,8 +7715,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7862,8 +7740,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7885,8 +7762,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7903,8 +7778,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -7936,8 +7810,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7963,8 +7835,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7986,8 +7857,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8004,8 +7873,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -8299,8 +8167,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8326,8 +8192,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8349,8 +8214,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8367,8 +8230,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -8400,8 +8262,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8427,8 +8287,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8450,8 +8309,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8468,8 +8325,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -8766,8 +8622,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8793,8 +8647,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8816,8 +8669,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8834,8 +8685,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -8867,8 +8717,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8894,8 +8742,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8917,8 +8764,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8935,8 +8780,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -9237,8 +9081,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9264,8 +9106,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9287,8 +9128,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9305,8 +9144,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -9338,8 +9176,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9365,8 +9201,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9388,8 +9223,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9406,8 +9239,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -10749,8 +10581,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10776,8 +10606,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -10799,8 +10628,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10817,8 +10644,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -10850,8 +10676,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10877,8 +10701,7 @@ "raw": "'bar'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -10900,8 +10723,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10918,8 +10739,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -11271,8 +11091,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11298,8 +11116,7 @@ "raw": "'str'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11321,8 +11138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11339,8 +11154,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -11372,8 +11186,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11399,8 +11211,7 @@ "raw": "'num'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11422,8 +11233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11440,8 +11249,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowAssignmentExpression.json b/crates/swc_ecma_parser/tests/tsc/controlFlowAssignmentExpression.json index 1b790b24ceda..5ccfcf77d659 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowAssignmentExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowAssignmentExpression.json @@ -503,8 +503,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -529,8 +527,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -552,8 +549,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -579,8 +574,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] }, @@ -612,8 +606,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -638,8 +630,7 @@ "value": false } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -661,8 +652,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -688,8 +677,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowBinaryOrExpression.json b/crates/swc_ecma_parser/tests/tsc/controlFlowBinaryOrExpression.json index 7a20978cdc1b..ddbfeb5494c5 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowBinaryOrExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowBinaryOrExpression.json @@ -419,8 +419,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -437,8 +435,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -499,8 +496,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -517,8 +512,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -811,8 +805,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -829,8 +821,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowBindingElement.json b/crates/swc_ecma_parser/tests/tsc/controlFlowBindingElement.json index 1c2abbbcd262..d3aac1d5cad6 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowBindingElement.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowBindingElement.json @@ -1278,8 +1278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1306,8 +1304,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1839,8 +1836,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1867,8 +1862,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2400,8 +2394,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2428,8 +2420,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json b/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json index 553d02a681bd..9fee37f49870 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowComputedPropertyNames.json @@ -1077,8 +1077,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1095,8 +1093,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1118,8 +1115,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1136,8 +1131,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1159,8 +1153,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1177,8 +1169,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowDeleteOperator.json b/crates/swc_ecma_parser/tests/tsc/controlFlowDeleteOperator.json index 7a32e7032e2a..e001b66616f0 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowDeleteOperator.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowDeleteOperator.json @@ -95,8 +95,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -132,8 +130,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -155,8 +152,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -192,8 +187,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowDestructuringDeclaration.json b/crates/swc_ecma_parser/tests/tsc/controlFlowDestructuringDeclaration.json index 574371b54971..e8580507cd50 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowDestructuringDeclaration.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowDestructuringDeclaration.json @@ -1272,8 +1272,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1309,8 +1307,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1453,8 +1450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1490,8 +1485,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1643,8 +1637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1680,8 +1672,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1859,8 +1850,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1896,8 +1885,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2040,8 +2028,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2077,8 +2063,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2230,8 +2215,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2267,8 +2250,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2446,8 +2428,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2483,8 +2463,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2603,8 +2582,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2640,8 +2617,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2769,8 +2745,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2806,8 +2780,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccess.json b/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccess.json index f064543a2038..9afb0c6b3396 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccess.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccess2.json b/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccess2.json index 73cd31648c3e..d49c611935c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccess2.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccess2.json @@ -130,8 +130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -148,8 +146,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccessNoCrash1.json b/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccessNoCrash1.json index 6ada279976d4..3deee216ffad 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccessNoCrash1.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowElementAccessNoCrash1.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -130,8 +125,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -184,8 +178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -202,8 +194,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -225,8 +216,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -260,8 +249,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -314,8 +302,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -332,8 +318,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -355,8 +340,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -400,8 +383,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -423,8 +405,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -478,8 +458,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowForInStatement2.json b/crates/swc_ecma_parser/tests/tsc/controlFlowForInStatement2.json index 30bb768fc1f6..98e2ec578414 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowForInStatement2.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowForInStatement2.json @@ -137,8 +137,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -155,8 +153,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -208,8 +205,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -226,8 +221,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json b/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json index c0a13cad951f..19bbdb1f7b6e 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json @@ -118,8 +118,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -146,8 +144,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1137,8 +1134,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1165,8 +1160,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3147,8 +3141,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3165,8 +3157,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3218,8 +3209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3245,8 +3234,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3268,8 +3256,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3286,8 +3272,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3339,8 +3324,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3366,8 +3349,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3389,8 +3371,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3407,8 +3387,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3430,8 +3409,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3448,8 +3425,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4275,8 +4251,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4301,8 +4275,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4324,8 +4297,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4360,8 +4331,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4413,8 +4383,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4439,8 +4407,7 @@ "value": false } } - }, - "typeParams": null + } } ] } @@ -4794,8 +4761,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4831,8 +4796,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -8224,8 +8188,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8242,8 +8204,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -8883,8 +8844,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8910,8 +8869,7 @@ "raw": "\"button\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8933,8 +8891,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8951,8 +8907,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -9005,8 +8960,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9032,8 +8985,7 @@ "raw": "\"checkbox\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9055,8 +9007,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9073,8 +9023,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -9733,8 +9682,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9770,8 +9717,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -9803,8 +9749,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9831,8 +9775,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -9866,8 +9809,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9884,8 +9825,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json b/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json index b32a4a67a326..5c4897c4f330 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json @@ -1567,8 +1567,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1595,8 +1593,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowInOperator.json b/crates/swc_ecma_parser/tests/tsc/controlFlowInOperator.json index 9a54273822d0..5ac68f86533c 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowInOperator.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowInOperator.json @@ -179,8 +179,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -197,8 +195,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -250,8 +247,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -268,8 +263,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowInstanceofExtendsFunction.json b/crates/swc_ecma_parser/tests/tsc/controlFlowInstanceofExtendsFunction.json index 32d3a6367783..f07e4f5c386a 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowInstanceofExtendsFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowInstanceofExtendsFunction.json @@ -68,7 +68,6 @@ "end": 65, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrorsAsync.json b/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrorsAsync.json index dfbc9da1d719..e42f7929d5a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrorsAsync.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowIterationErrorsAsync.json @@ -3815,8 +3815,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3852,8 +3850,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3931,8 +3928,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3957,8 +3952,7 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowNullishCoalesce.json b/crates/swc_ecma_parser/tests/tsc/controlFlowNullishCoalesce.json index c11325e65fc7..7d395e8d3aae 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowNullishCoalesce.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowNullishCoalesce.json @@ -235,8 +235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -253,8 +251,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -345,8 +342,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -363,8 +358,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json index 6c4414e978f2..58264405a6e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json @@ -1564,7 +1564,6 @@ "end": 642, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2250,8 +2249,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2277,8 +2274,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2300,8 +2296,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2318,8 +2312,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2351,8 +2344,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2378,8 +2369,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2401,8 +2391,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2419,8 +2407,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -2884,8 +2871,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2921,8 +2906,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2939,13 +2922,11 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -3559,8 +3540,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3596,8 +3575,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3633,8 +3610,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3670,8 +3645,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3688,23 +3661,19 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -5372,7 +5341,6 @@ "end": 1607, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5511,8 +5479,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5529,8 +5495,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7123,8 +7088,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7160,8 +7123,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -7170,7 +7132,6 @@ "end": 2455, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7223,8 +7184,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7241,8 +7200,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } @@ -19781,8 +19739,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -19808,8 +19764,7 @@ "raw": "'rectangle'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -19831,8 +19786,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -19849,8 +19802,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -19872,8 +19824,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -19890,8 +19840,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -19923,8 +19872,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -19950,8 +19897,7 @@ "raw": "'circle'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -19973,8 +19919,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -19991,8 +19935,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -20409,8 +20352,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20427,8 +20368,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -20450,8 +20390,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20487,8 +20425,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20505,8 +20441,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -20528,8 +20463,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20554,13 +20487,11 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -20883,8 +20814,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20901,8 +20830,7 @@ }, "kind": "unknown" } - }, - "typeParams": null + } } ] } @@ -21655,8 +21583,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -21718,8 +21644,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -22077,8 +22002,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -22114,8 +22037,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -22179,13 +22100,11 @@ ] } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain2.json b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain2.json index 6b217fb90f19..0ddd38d805e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain2.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain2.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -80,8 +78,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -103,8 +100,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -121,8 +116,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -174,8 +168,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -201,8 +193,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } } ] } @@ -824,8 +815,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -842,8 +831,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -865,8 +853,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -892,8 +878,7 @@ "raw": "'u'" } } - }, - "typeParams": null + } } ] } @@ -945,8 +930,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -963,8 +946,7 @@ }, "kind": "null" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -986,8 +968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1013,8 +993,7 @@ "raw": "'n'" } } - }, - "typeParams": null + } } ] } @@ -1066,8 +1045,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1093,8 +1070,7 @@ "raw": "'X'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1116,8 +1092,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1143,8 +1117,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowStringIndex.json b/crates/swc_ecma_parser/tests/tsc/controlFlowStringIndex.json index c058bb2e86b4..d0b30a24f707 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowStringIndex.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowStringIndex.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowWithTemplateLiterals.json b/crates/swc_ecma_parser/tests/tsc/controlFlowWithTemplateLiterals.json index 35ea42916249..88e64a4b04b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowWithTemplateLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowWithTemplateLiterals.json @@ -272,8 +272,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -290,8 +288,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json b/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json index 0301ea79a490..5496ecbd22f6 100644 --- a/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json +++ b/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json @@ -73,7 +73,6 @@ "end": 152, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -249,8 +248,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +264,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -341,8 +337,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -359,8 +353,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -920,7 +913,6 @@ "end": 426, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1075,7 +1067,6 @@ "end": 490, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1434,7 +1425,6 @@ "end": 629, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1589,7 +1579,6 @@ "end": 693, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1948,7 +1937,6 @@ "end": 829, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2103,7 +2091,6 @@ "end": 907, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2489,7 +2476,6 @@ "end": 1040, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2654,7 +2640,6 @@ "end": 1101, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3054,7 +3039,6 @@ "end": 1236, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3746,7 +3730,6 @@ "end": 1474, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3886,7 +3869,6 @@ "end": 1515, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4348,7 +4330,6 @@ "end": 1681, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4426,7 +4407,6 @@ "end": 1690, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4860,7 +4840,6 @@ "end": 1859, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4938,7 +4917,6 @@ "end": 1868, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5050,7 +5028,6 @@ "end": 1912, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5128,7 +5105,6 @@ "end": 1921, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicatesWithPrivateName01.json b/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicatesWithPrivateName01.json index ab254177c833..66053004b0b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicatesWithPrivateName01.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationEmitIdentifierPredicatesWithPrivateName01.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicates02.json b/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicates02.json index 8ce79129b75a..7b6e41e00603 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicates02.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicates02.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -102,8 +99,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -120,8 +115,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -143,8 +137,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -161,8 +153,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicatesWithPrivateName02.json b/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicatesWithPrivateName02.json index 179c2ac55cb3..ac20b8c5ad29 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicatesWithPrivateName02.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationEmitThisPredicatesWithPrivateName02.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -136,8 +130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -154,8 +146,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/declarationFiles.json b/crates/swc_ecma_parser/tests/tsc/declarationFiles.json index 23a812e95d1d..d084c23943fc 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationFiles.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationFiles.json @@ -421,8 +421,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -449,8 +447,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -472,8 +469,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -489,8 +484,7 @@ "ctxt": 0 } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge01.json b/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge01.json index bf53bff8efba..e7e436517d6b 100644 --- a/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge01.json +++ b/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge01.json @@ -121,8 +121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -139,8 +137,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -162,8 +159,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -180,8 +175,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge02.json b/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge02.json index 549c9dd29e3c..198375ddfd25 100644 --- a/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge02.json +++ b/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge02.json @@ -94,8 +94,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -112,8 +110,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -135,8 +132,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -153,8 +148,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge03.json b/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge03.json index c1212cace333..0ce2603e22f9 100644 --- a/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge03.json +++ b/crates/swc_ecma_parser/tests/tsc/defaultExportsCannotMerge03.json @@ -87,8 +87,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -105,8 +103,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -128,8 +125,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -146,8 +141,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/deleteChain.json b/crates/swc_ecma_parser/tests/tsc/deleteChain.json index 2363db425173..466801847672 100644 --- a/crates/swc_ecma_parser/tests/tsc/deleteChain.json +++ b/crates/swc_ecma_parser/tests/tsc/deleteChain.json @@ -84,8 +84,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -102,8 +100,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -310,8 +307,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -347,8 +342,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -365,13 +358,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -615,8 +606,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -669,8 +658,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -687,15 +674,13 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } ] } - }, - "typeParams": null + } } ] } @@ -919,8 +904,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -956,8 +939,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -993,8 +974,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1030,8 +1009,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1048,23 +1025,19 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1517,7 +1490,6 @@ "end": 447, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1566,8 +1538,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1603,8 +1573,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1640,8 +1608,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1658,18 +1624,15 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2044,8 +2007,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2081,8 +2042,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2118,8 +2077,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2155,8 +2112,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2173,23 +2128,19 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json b/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json index 2aeedeea49d8..ec44af3bc0c4 100644 --- a/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json +++ b/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -88,8 +86,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -111,8 +108,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -129,8 +124,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -162,8 +156,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +181,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -212,8 +203,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -230,8 +219,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2043,8 +2031,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2070,8 +2056,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2093,8 +2078,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2130,8 +2113,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -2163,8 +2145,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2190,8 +2170,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2213,8 +2192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2250,8 +2227,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3786,8 +3762,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3813,8 +3787,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3836,8 +3809,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3862,8 +3833,7 @@ "value": true } } - }, - "typeParams": null + } } ] }, @@ -3895,8 +3865,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3922,8 +3890,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3945,8 +3912,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3971,8 +3936,7 @@ "value": false } } - }, - "typeParams": null + } } ] }, @@ -4004,8 +3968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4031,8 +3993,7 @@ "raw": "'C'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4054,8 +4015,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4080,8 +4039,7 @@ "value": false } } - }, - "typeParams": null + } } ] } @@ -5010,8 +4968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5037,8 +4993,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5060,8 +5015,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5088,8 +5041,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5174,8 +5126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5201,8 +5151,7 @@ "raw": "'b'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5224,8 +5173,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5280,8 +5227,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -6205,8 +6151,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6232,8 +6176,7 @@ "raw": "'add'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6255,8 +6198,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6292,8 +6233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6310,13 +6249,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] }, @@ -6348,8 +6285,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6375,8 +6310,7 @@ "raw": "'remove'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6398,8 +6332,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6435,8 +6367,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6453,13 +6383,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -8919,8 +8847,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8937,8 +8863,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8960,8 +8885,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8978,8 +8901,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -9057,8 +8979,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9083,8 +9003,7 @@ "kind": "any" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9106,8 +9025,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9132,8 +9049,7 @@ "kind": "any" } } - }, - "typeParams": null + } } ] } @@ -9926,7 +9842,6 @@ "end": 5420, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10565,7 +10480,6 @@ "end": 5699, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11232,7 +11146,6 @@ "end": 6004, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -11917,7 +11830,6 @@ "end": 6310, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -14069,8 +13981,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14095,8 +14005,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14118,8 +14027,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14136,8 +14043,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -14169,8 +14075,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14195,8 +14099,7 @@ "value": false } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14218,8 +14121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14236,8 +14137,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -14942,8 +14842,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14989,8 +14887,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -15012,8 +14909,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15097,8 +14992,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPrivates.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPrivates.json index 44480ab8dc33..485f3e0248ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPrivates.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPrivates.json @@ -79,8 +79,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -97,8 +95,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -193,8 +190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -211,8 +206,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -234,8 +228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -252,8 +244,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -357,8 +348,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -375,8 +364,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -471,8 +459,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -489,8 +475,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -512,8 +497,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -530,8 +513,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers.json index 46ab61d9f0a0..6161e000e8e6 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers2.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers2.json index 83979c7c2e58..799dd07e4be0 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers2.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers2.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers3.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers3.json index 5596c20496fd..ebdd6a7d4ac9 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers3.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers3.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers4.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers4.json index ba3baca409e1..ab704c8d4e50 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers4.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesProtectedMembers4.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPublicMembers.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPublicMembers.json index 13274bebbb87..d11a74660181 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPublicMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesPublicMembers.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesWithoutSubtype.json b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesWithoutSubtype.json index 7dc38b046850..367943e4cb52 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesWithoutSubtype.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassOverridesWithoutSubtype.json @@ -79,8 +79,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -97,8 +95,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -193,8 +190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -211,8 +206,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -316,8 +310,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -334,8 +326,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -430,8 +421,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -448,8 +437,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedInterfaceIncompatibleWithBaseIndexer.json b/crates/swc_ecma_parser/tests/tsc/derivedInterfaceIncompatibleWithBaseIndexer.json index 0682aecdd019..a724410eaa6b 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedInterfaceIncompatibleWithBaseIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedInterfaceIncompatibleWithBaseIndexer.json @@ -100,8 +100,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -118,8 +116,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -141,8 +138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +154,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -239,8 +233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -257,8 +249,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -342,8 +333,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -379,8 +368,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -397,13 +384,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -476,8 +461,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -513,8 +496,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -531,13 +512,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -610,8 +589,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -647,8 +624,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -665,13 +640,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -731,7 +704,6 @@ "end": 359, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -780,8 +752,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -798,8 +768,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -877,8 +846,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -914,8 +881,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -932,13 +897,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1011,8 +974,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1048,8 +1009,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1066,13 +1025,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.json b/crates/swc_ecma_parser/tests/tsc/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.json index f2692f7e2e86..56c53c317522 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedTypeAccessesHiddenBaseCallViaSuperPropertyAccess.json @@ -97,8 +97,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -115,8 +113,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -194,8 +191,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -212,8 +207,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -324,8 +318,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -342,8 +334,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -365,8 +356,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -383,8 +372,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -462,8 +450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -480,8 +466,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -503,8 +488,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -521,8 +504,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json index c09a0e83e60d..41e4cc41356d 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringArrayBindingPatternAndAssignment2.json @@ -489,8 +489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -507,8 +505,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringControlFlow.json b/crates/swc_ecma_parser/tests/tsc/destructuringControlFlow.json index 9779496611a6..e8fe1e095bff 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringControlFlow.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringControlFlow.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1174,8 +1171,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1192,8 +1187,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1215,8 +1209,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1233,8 +1225,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringInFunctionType.json b/crates/swc_ecma_parser/tests/tsc/destructuringInFunctionType.json index 90444a6ec285..95e6c9d47f3b 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringInFunctionType.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringInFunctionType.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -110,10 +107,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -166,10 +160,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -443,10 +434,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -602,8 +590,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -630,8 +616,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -672,8 +657,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -700,8 +683,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -912,8 +894,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -987,8 +967,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment9SiblingInitializer.json b/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment9SiblingInitializer.json index fbdc2d394916..b3243a143bc6 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment9SiblingInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringObjectBindingPatternAndAssignment9SiblingInitializer.json @@ -973,8 +973,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -991,8 +989,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1014,8 +1011,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1032,8 +1027,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json index 39f6bf19dbf3..c0fe4483338b 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5.json @@ -272,8 +272,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -290,8 +288,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -313,8 +310,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -331,8 +326,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -590,8 +584,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -608,8 +600,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -631,8 +622,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -649,8 +638,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -672,8 +660,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -709,8 +695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -727,8 +711,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -750,8 +733,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -768,13 +749,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -796,8 +775,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -849,8 +826,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -993,8 +969,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1011,8 +985,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1034,8 +1007,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1052,8 +1023,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1859,7 +1829,6 @@ "end": 1118, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3400,8 +3369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3437,8 +3404,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4676,7 +4642,6 @@ "end": 2714, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4746,7 +4711,6 @@ "end": 2734, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4843,7 +4807,6 @@ "end": 2753, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5911,8 +5874,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5929,8 +5890,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6045,8 +6005,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6063,8 +6021,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6331,8 +6288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6404,8 +6359,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json index 39301bf5e925..3b4cbbe03570 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES5iterable.json @@ -272,8 +272,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -290,8 +288,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -313,8 +310,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -331,8 +326,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -590,8 +584,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -608,8 +600,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -631,8 +622,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -649,8 +638,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -672,8 +660,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -709,8 +695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -727,8 +711,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -750,8 +733,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -768,13 +749,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -796,8 +775,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -849,8 +826,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -993,8 +969,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1011,8 +985,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1034,8 +1007,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1052,8 +1023,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1859,7 +1829,6 @@ "end": 1147, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3400,8 +3369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3437,8 +3404,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4676,7 +4642,6 @@ "end": 2742, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4746,7 +4711,6 @@ "end": 2762, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4843,7 +4807,6 @@ "end": 2781, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5911,8 +5874,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5929,8 +5890,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6045,8 +6005,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6063,8 +6021,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6331,8 +6288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6404,8 +6359,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json index 77594b92d5b5..78f4694bc34b 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration1ES6.json @@ -272,8 +272,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -290,8 +288,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -313,8 +310,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -331,8 +326,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -590,8 +584,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -608,8 +600,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -631,8 +622,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -649,8 +638,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -672,8 +660,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -709,8 +695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -727,8 +711,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -750,8 +733,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -768,13 +749,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -796,8 +775,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -849,8 +826,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -993,8 +969,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1011,8 +985,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1034,8 +1007,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1052,8 +1023,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1859,7 +1829,6 @@ "end": 1168, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3188,8 +3157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3225,8 +3192,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4336,7 +4302,6 @@ "end": 2588, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4406,7 +4371,6 @@ "end": 2608, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4503,7 +4467,6 @@ "end": 2627, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5571,8 +5534,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5589,8 +5550,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5705,8 +5665,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5723,8 +5681,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5991,8 +5948,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6064,8 +6019,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json index 0ccf6ad2dd6b..230fb4744845 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json @@ -775,8 +775,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -803,8 +801,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -969,8 +966,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -997,8 +992,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1163,8 +1157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1191,8 +1183,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration7ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration7ES5.json index b31dbf4b6a74..726923612198 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration7ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration7ES5.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration7ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration7ES5iterable.json index e65ca1bbdb10..df05ba6d3050 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration7ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration7ES5iterable.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration8.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration8.json index 3a6e568a6ef0..3e41f04c2dd8 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration8.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration8.json @@ -156,8 +156,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -211,8 +209,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -234,8 +231,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -271,8 +266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -326,13 +319,11 @@ } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5.json index 8b09938cff9a..b894bee93966 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5.json @@ -108,8 +108,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +124,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -149,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -167,8 +162,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2320,8 +2314,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2357,8 +2349,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2383,13 +2373,11 @@ "kind": "any" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2621,8 +2609,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2658,8 +2644,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2684,13 +2668,11 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5iterable.json index 77a1d0057432..4040f2ef52e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES5iterable.json @@ -108,8 +108,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +124,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -149,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -167,8 +162,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2320,8 +2314,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2357,8 +2349,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2383,13 +2373,11 @@ "kind": "any" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2621,8 +2609,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2658,8 +2644,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2684,13 +2668,11 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES6.json b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES6.json index b83921176bd6..6796ff971d9f 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration1ES6.json @@ -108,8 +108,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +124,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -149,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -167,8 +162,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2320,8 +2314,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2357,8 +2349,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2383,13 +2373,11 @@ "kind": "any" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2621,8 +2609,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2658,8 +2644,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2684,13 +2668,11 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration2.json b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration2.json index 17b96e527d70..ad2a420f7c71 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration2.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringVariableDeclaration2.json @@ -108,8 +108,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +124,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -149,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -167,8 +162,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1176,8 +1170,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1213,8 +1205,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1239,13 +1229,11 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json b/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json index 4ca955b48099..a22e5d419c2d 100644 --- a/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json +++ b/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json @@ -1148,8 +1148,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1176,8 +1174,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -1482,8 +1479,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1510,8 +1505,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json index 194efddc3834..a83f63a58940 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json @@ -85,8 +85,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -112,8 +110,7 @@ "raw": "\"foo\"" } } - }, - "typeParams": null + } }, { "type": "TsCallSignatureDeclaration", @@ -242,8 +239,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -269,8 +264,7 @@ "raw": "\"bar\"" } } - }, - "typeParams": null + } }, { "type": "TsCallSignatureDeclaration", @@ -806,8 +800,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -833,8 +825,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -856,8 +847,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -884,8 +873,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -917,8 +905,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -944,8 +930,7 @@ "raw": "'b'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -967,8 +952,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1003,8 +986,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.json index 27adeda788d8..d17915e4c310 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes1.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -81,8 +79,7 @@ "raw": "\"square\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -104,8 +101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -122,8 +117,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -176,8 +170,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -203,8 +195,7 @@ "raw": "\"rectangle\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -226,8 +217,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -244,8 +233,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -267,8 +255,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -285,8 +271,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -339,8 +324,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -366,8 +349,7 @@ "raw": "\"circle\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -389,8 +371,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -407,8 +387,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2668,8 +2647,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2695,8 +2672,7 @@ "raw": "\"A\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2718,8 +2694,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2736,8 +2710,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2769,8 +2742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2824,8 +2795,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2847,8 +2817,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2865,8 +2833,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -2898,8 +2865,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2925,8 +2890,7 @@ "raw": "\"D\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json index e9aaddff2d75..0a2d036176c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json @@ -80,8 +80,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ "value": false } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -180,8 +174,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -206,8 +198,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -229,8 +220,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -247,8 +236,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -280,8 +268,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -298,8 +284,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -321,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -339,8 +322,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -691,8 +673,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -717,8 +697,7 @@ "value": false } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -740,8 +719,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -758,8 +735,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -791,8 +767,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -817,8 +791,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -840,8 +813,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -858,8 +829,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -891,8 +861,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -909,8 +877,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -932,8 +899,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -950,8 +915,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1269,8 +1233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1287,8 +1249,7 @@ }, "kind": "null" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1310,8 +1271,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1328,8 +1287,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1361,8 +1319,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1379,8 +1335,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1402,8 +1357,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1420,8 +1373,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1631,8 +1583,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1658,8 +1608,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1681,8 +1630,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1699,8 +1646,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1732,8 +1678,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1760,8 +1704,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1783,8 +1726,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1801,8 +1742,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2054,8 +1994,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2072,8 +2010,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2095,8 +2032,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2123,8 +2058,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -2156,8 +2090,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2184,8 +2116,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2649,8 +2580,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2677,8 +2606,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2700,8 +2628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2718,8 +2644,7 @@ }, "kind": "null" } - }, - "typeParams": null + } } ] } @@ -2804,8 +2729,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2822,8 +2745,7 @@ }, "kind": "null" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2845,8 +2767,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2873,8 +2793,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3601,8 +3520,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3627,8 +3544,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3650,8 +3566,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3668,8 +3582,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -3701,8 +3614,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3727,8 +3638,7 @@ "value": false } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3750,8 +3660,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3768,8 +3676,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -4255,8 +4162,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4282,8 +4187,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4305,8 +4209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4323,8 +4225,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -4376,8 +4277,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4403,8 +4302,7 @@ "raw": "'b'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4426,8 +4324,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4444,8 +4340,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -4497,8 +4392,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4524,8 +4417,7 @@ "raw": "'c'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4547,8 +4439,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4565,8 +4455,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5008,8 +4897,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5035,8 +4922,7 @@ "raw": "'number'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5058,8 +4944,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5076,8 +4960,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -5109,8 +4992,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5136,8 +5017,7 @@ "raw": "'string'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5159,8 +5039,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5177,8 +5055,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -5210,8 +5087,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5237,8 +5112,7 @@ "raw": "'boolean'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5260,8 +5134,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5278,8 +5150,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -5379,8 +5250,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5406,8 +5275,7 @@ "raw": "'number'" } } - }, - "typeParams": null + } } ] } @@ -5693,8 +5561,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5720,8 +5586,7 @@ "raw": "'number'" } } - }, - "typeParams": null + } } ] }, @@ -5753,8 +5618,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5780,8 +5643,7 @@ "raw": "'string'" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes3.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes3.json index 433e13861781..5a93fa9b0781 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes3.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -94,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -120,8 +115,7 @@ "value": true } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -143,8 +137,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -161,8 +153,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } } ] } @@ -214,8 +205,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -274,8 +263,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions01.json b/crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions01.json index cc1c833f35dc..2c2153b4a541 100644 --- a/crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions01.json +++ b/crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions01.json @@ -78,8 +78,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -96,8 +94,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -119,8 +116,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -137,8 +132,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions02.json b/crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions02.json index c88cbe616995..6277849c2d6c 100644 --- a/crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions02.json +++ b/crates/swc_ecma_parser/tests/tsc/duplicatePropertiesInTypeAssertions02.json @@ -78,8 +78,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -96,8 +94,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -119,8 +116,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -137,8 +132,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/elementAccessChain.2.json b/crates/swc_ecma_parser/tests/tsc/elementAccessChain.2.json index 8d9d22a2a40c..76c6e80ab4e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/elementAccessChain.2.json +++ b/crates/swc_ecma_parser/tests/tsc/elementAccessChain.2.json @@ -84,8 +84,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -102,8 +100,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -247,8 +244,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -284,8 +279,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -302,13 +295,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -542,8 +533,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -596,8 +585,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -614,15 +601,13 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/elementAccessChain.json b/crates/swc_ecma_parser/tests/tsc/elementAccessChain.json index 94ac10ebc3bb..fa6a283193dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/elementAccessChain.json +++ b/crates/swc_ecma_parser/tests/tsc/elementAccessChain.json @@ -84,8 +84,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -102,8 +100,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -247,8 +244,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -284,8 +279,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -302,13 +295,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -542,8 +533,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -596,8 +585,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -614,15 +601,13 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } ] } - }, - "typeParams": null + } } ] } @@ -836,8 +821,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -873,8 +856,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -910,8 +891,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -947,8 +926,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -965,23 +942,19 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1298,7 +1271,6 @@ "end": 383, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1347,8 +1319,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1384,8 +1354,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1421,8 +1389,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1439,18 +1405,15 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2207,8 +2170,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2225,8 +2186,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionProperty.json b/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionProperty.json index ca32d1428df0..f64a8aa12eb5 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionProperty.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -129,8 +127,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionPropertyES6.json b/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionPropertyES6.json index ca32d1428df0..f64a8aa12eb5 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionPropertyES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitRestParametersFunctionPropertyES6.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -129,8 +127,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/enumAssignability.json b/crates/swc_ecma_parser/tests/tsc/enumAssignability.json index ca282fb84a69..ceda73c6f0b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumAssignability.json +++ b/crates/swc_ecma_parser/tests/tsc/enumAssignability.json @@ -720,8 +720,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -738,8 +736,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1738,8 +1735,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1756,8 +1751,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json index dfac35df02c3..84305a95242e 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json @@ -161,8 +161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +187,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1837,8 +1834,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1855,8 +1850,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1909,8 +1903,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1927,8 +1919,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2443,8 +2434,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2461,8 +2450,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/enumBasics.json b/crates/swc_ecma_parser/tests/tsc/enumBasics.json index dd64daa971cf..3cbd3889f8d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumBasics.json +++ b/crates/swc_ecma_parser/tests/tsc/enumBasics.json @@ -264,8 +264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -305,8 +303,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -328,8 +325,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -369,8 +364,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -392,8 +386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -433,8 +425,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json b/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json index a0db9c7d70a5..2c2e9930ba81 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json +++ b/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json @@ -151,8 +151,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -179,8 +177,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -289,8 +286,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -317,8 +312,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -427,8 +421,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -455,8 +447,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -565,8 +556,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -593,8 +582,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -713,8 +701,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -741,8 +727,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -861,8 +846,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -889,8 +872,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -989,8 +971,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1007,8 +987,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1041,8 +1020,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1069,8 +1046,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1187,8 +1163,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1215,8 +1189,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1335,8 +1308,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1363,8 +1334,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1555,8 +1525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1583,8 +1551,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1835,8 +1802,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1863,8 +1828,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2003,8 +1967,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2031,8 +1993,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2239,8 +2200,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2267,8 +2226,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2428,8 +2386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2456,8 +2412,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2690,8 +2645,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2718,8 +2671,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2990,8 +2942,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3018,8 +2968,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3170,8 +3119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3198,8 +3145,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3391,8 +3337,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3419,8 +3363,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3539,8 +3482,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3567,8 +3508,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3677,8 +3617,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3705,8 +3643,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes1.json b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes1.json index 2a2bfa719ce2..7c74544beeab 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes1.json @@ -4380,8 +4380,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4421,8 +4419,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4444,8 +4441,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4462,8 +4457,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -4495,8 +4489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4536,8 +4528,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4559,8 +4550,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4577,8 +4566,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes2.json index 44db6dcb8887..12816d05dbc4 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/enumLiteralTypes2.json @@ -4380,8 +4380,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4421,8 +4419,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4444,8 +4441,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4462,8 +4457,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -4495,8 +4489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4536,8 +4528,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4559,8 +4550,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4577,8 +4566,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/equalityWithIntersectionTypes01.json b/crates/swc_ecma_parser/tests/tsc/equalityWithIntersectionTypes01.json index 9bb8add30c8d..86c123222968 100644 --- a/crates/swc_ecma_parser/tests/tsc/equalityWithIntersectionTypes01.json +++ b/crates/swc_ecma_parser/tests/tsc/equalityWithIntersectionTypes01.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -218,8 +212,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +228,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/equalityWithUnionTypes01.json b/crates/swc_ecma_parser/tests/tsc/equalityWithUnionTypes01.json index c2f572879709..0d1311fe1ca8 100644 --- a/crates/swc_ecma_parser/tests/tsc/equalityWithUnionTypes01.json +++ b/crates/swc_ecma_parser/tests/tsc/equalityWithUnionTypes01.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json b/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json index ae37447942eb..1b2c2a20b820 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json @@ -234,8 +234,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -252,8 +250,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1168,8 +1165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1186,8 +1181,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json index 9d4af6084276..07fef7d0e777 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1716,8 +1713,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1734,8 +1729,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json index 7d6cd13860d3..d9d3cf54e48a 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1859,8 +1856,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1877,8 +1872,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json index 82762f2b5e85..69ffd3911845 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/exhaustiveSwitchStatements1.json b/crates/swc_ecma_parser/tests/tsc/exhaustiveSwitchStatements1.json index b478760cd126..fec3aca77f8d 100644 --- a/crates/swc_ecma_parser/tests/tsc/exhaustiveSwitchStatements1.json +++ b/crates/swc_ecma_parser/tests/tsc/exhaustiveSwitchStatements1.json @@ -1527,8 +1527,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1554,8 +1552,7 @@ "raw": "\"square\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1577,8 +1574,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1595,8 +1590,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1649,8 +1643,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1676,8 +1668,7 @@ "raw": "\"rectangle\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1699,8 +1690,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1717,8 +1706,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1740,8 +1728,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1758,8 +1744,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1812,8 +1797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1839,8 +1822,7 @@ "raw": "\"circle\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1862,8 +1844,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1880,8 +1860,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1934,8 +1913,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1961,8 +1938,7 @@ "raw": "\"triangle\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1984,8 +1960,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2002,8 +1976,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5213,8 +5186,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5240,8 +5211,7 @@ "raw": "\"square\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5263,8 +5233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5281,8 +5249,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5335,8 +5302,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5362,8 +5327,7 @@ "raw": "\"circle\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5385,8 +5349,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5403,8 +5365,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6673,8 +6634,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6701,8 +6660,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -7323,8 +7281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7341,8 +7297,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7364,8 +7319,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7382,8 +7335,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7806,8 +7758,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7833,8 +7783,7 @@ "raw": "\"abc\"" } } - }, - "typeParams": null + } } ] }, @@ -7866,8 +7815,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7893,8 +7840,7 @@ "raw": "\"def\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithInvalidOperands.json b/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithInvalidOperands.json index 3d7fc050ac59..dc9716cbc1e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithInvalidOperands.json +++ b/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithInvalidOperands.json @@ -342,8 +342,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -360,8 +358,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json index 829890213ff8..c2c89aed4ded 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json @@ -217,8 +217,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -235,8 +233,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -258,8 +255,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +271,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json index e7bd57f627cf..b0b90efb9296 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentMergedInterface.json @@ -109,8 +109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -127,8 +125,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -236,8 +233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -254,8 +249,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -277,8 +271,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -314,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -332,8 +322,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -355,8 +344,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -373,13 +360,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/exportCodeGen.json b/crates/swc_ecma_parser/tests/tsc/exportCodeGen.json index 6608e35d7353..05e5f75b22ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportCodeGen.json +++ b/crates/swc_ecma_parser/tests/tsc/exportCodeGen.json @@ -647,8 +647,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -665,8 +663,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -993,8 +990,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1011,8 +1006,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json b/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json index f95bc39b9574..f5d3170f280f 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json +++ b/crates/swc_ecma_parser/tests/tsc/exportImportAlias.json @@ -316,8 +316,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -334,8 +332,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -563,8 +560,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -581,8 +576,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -604,8 +598,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -622,8 +614,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -777,8 +768,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -795,8 +784,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1398,8 +1386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1416,8 +1402,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1439,8 +1424,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1457,8 +1440,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1822,8 +1804,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1840,8 +1820,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1863,8 +1842,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1881,8 +1858,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2029,8 +2005,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2047,8 +2021,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2204,8 +2177,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2222,8 +2193,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2245,8 +2215,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2263,8 +2231,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/exportNonVisibleType.json b/crates/swc_ecma_parser/tests/tsc/exportNonVisibleType.json index 69b184a52bb9..83102c1dfc1e 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportNonVisibleType.json +++ b/crates/swc_ecma_parser/tests/tsc/exportNonVisibleType.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -299,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -317,8 +309,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -340,8 +331,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -358,8 +347,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -512,8 +500,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -530,8 +516,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -553,8 +538,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -571,8 +554,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/exportTypeMergedWithExportStarAsNamespace.json b/crates/swc_ecma_parser/tests/tsc/exportTypeMergedWithExportStarAsNamespace.json index 787ccb5293e6..4f7c410cc7d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportTypeMergedWithExportStarAsNamespace.json +++ b/crates/swc_ecma_parser/tests/tsc/exportTypeMergedWithExportStarAsNamespace.json @@ -349,8 +349,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -377,8 +375,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -470,8 +467,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -498,8 +493,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json b/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json index a8e6c8a5f66d..f16cad863e56 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json @@ -41,7 +41,6 @@ "end": 43, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -81,7 +80,6 @@ "end": 73, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json b/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json index f3938ebef318..e0c3a8c0a49a 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json @@ -41,7 +41,6 @@ "end": 42, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -81,7 +80,6 @@ "end": 71, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json b/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json index eca7fcb807ba..fc55e9f3e84c 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json @@ -41,7 +41,6 @@ "end": 42, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -81,7 +80,6 @@ "end": 71, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/fluentInterfaces.json b/crates/swc_ecma_parser/tests/tsc/fluentInterfaces.json index de212f7b1278..823f733e2006 100644 --- a/crates/swc_ecma_parser/tests/tsc/fluentInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/fluentInterfaces.json @@ -41,7 +41,6 @@ "end": 31, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -131,7 +130,6 @@ "end": 74, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -221,7 +219,6 @@ "end": 117, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/for-inStatements.json b/crates/swc_ecma_parser/tests/tsc/for-inStatements.json index 7b6432b780b3..9e145ceacb90 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-inStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/for-inStatements.json @@ -2821,8 +2821,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2839,8 +2837,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json b/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json index a799c0b061a0..13acd5eaa83c 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json +++ b/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json @@ -2635,8 +2635,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2653,8 +2651,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/for-of29.json b/crates/swc_ecma_parser/tests/tsc/for-of29.json index 1864c6527984..bcc61c128f3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-of29.json +++ b/crates/swc_ecma_parser/tests/tsc/for-of29.json @@ -54,7 +54,6 @@ "end": 94, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/for-of58.json b/crates/swc_ecma_parser/tests/tsc/for-of58.json index 09e06f95fb6c..924441d744a2 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-of58.json +++ b/crates/swc_ecma_parser/tests/tsc/for-of58.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -80,8 +78,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] } @@ -133,8 +130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +155,7 @@ "raw": "'y'" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/forStatements.json b/crates/swc_ecma_parser/tests/tsc/forStatements.json index 76d69266778d..12a630364f57 100644 --- a/crates/swc_ecma_parser/tests/tsc/forStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/forStatements.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1932,8 +1929,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1950,8 +1945,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json index 60c09ddb5737..1d755c03c85f 100644 --- a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json +++ b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleValidDecl.json b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleValidDecl.json index fec626363147..ce701b15f011 100644 --- a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleValidDecl.json +++ b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleValidDecl.json @@ -357,8 +357,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -375,8 +373,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -398,8 +395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -416,8 +411,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -932,8 +926,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -950,8 +942,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -973,8 +964,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -991,8 +980,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1196,8 +1184,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1214,8 +1200,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1237,8 +1222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1255,8 +1238,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/functionCalls.json b/crates/swc_ecma_parser/tests/tsc/functionCalls.json index b0a580d38c7f..2d717fe33559 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionCalls.json +++ b/crates/swc_ecma_parser/tests/tsc/functionCalls.json @@ -383,8 +383,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -401,8 +399,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json index 8231b64b6f92..a0f070932758 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json +++ b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json @@ -3430,8 +3430,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3448,8 +3446,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json index 0a63397cd042..653b059a88e2 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json @@ -1899,8 +1899,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1917,8 +1915,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/functionImplementations.json b/crates/swc_ecma_parser/tests/tsc/functionImplementations.json index 3b94db5d6531..e29703fdf7ee 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionImplementations.json +++ b/crates/swc_ecma_parser/tests/tsc/functionImplementations.json @@ -2819,8 +2819,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2837,8 +2835,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2860,8 +2857,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2878,8 +2873,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiterals.json b/crates/swc_ecma_parser/tests/tsc/functionLiterals.json index 1657421f38d9..c0662e6b3517 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiterals.json @@ -54,7 +54,6 @@ "end": 159, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -135,8 +134,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -199,8 +196,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -222,8 +218,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -296,8 +290,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -794,7 +787,6 @@ "end": 481, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -862,7 +854,6 @@ "end": 511, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -943,8 +934,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1072,8 +1061,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1278,7 +1266,6 @@ "end": 703, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1401,8 +1388,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1507,8 +1492,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1530,8 +1514,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1646,8 +1628,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2144,7 +2125,6 @@ "end": 1032, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2254,7 +2234,6 @@ "end": 1060, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2377,8 +2356,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2590,8 +2567,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json b/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json index d173b829b922..10bd280ccd28 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json @@ -1968,8 +1968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2052,8 +2050,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json index 46874abcfd9e..acd8fe0bbbb3 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json @@ -736,8 +736,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -754,8 +752,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -777,8 +774,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -795,8 +790,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -868,8 +862,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -886,8 +878,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -909,8 +900,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -927,8 +916,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json index 2424d5e20740..7c41cb1362ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json @@ -259,7 +259,6 @@ "end": 180, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1819,8 +1818,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1855,8 +1852,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -3982,8 +3978,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4018,8 +4012,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -6144,8 +6137,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6180,8 +6171,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -8306,8 +8296,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8342,8 +8330,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -10468,8 +10455,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10504,8 +10489,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -12630,8 +12614,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12666,8 +12648,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -14792,8 +14773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14828,8 +14807,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -17199,8 +17177,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -17235,8 +17211,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -19763,8 +19738,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -19799,8 +19772,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -22333,8 +22305,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -22369,8 +22339,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -24642,8 +24611,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -24678,8 +24645,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -26782,8 +26748,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -26818,8 +26782,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -29439,8 +29402,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -29475,8 +29436,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -31977,8 +31937,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -32013,8 +31971,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -34469,8 +34426,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -34505,8 +34460,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -36789,8 +36743,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -36825,8 +36777,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -39114,8 +39065,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -39150,8 +39099,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -40872,8 +40820,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -40908,8 +40854,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -42416,8 +42361,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -42452,8 +42395,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -44146,8 +44088,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -44182,8 +44122,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -44818,8 +44757,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -44872,8 +44809,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -45016,8 +44952,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -45070,8 +45004,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -45234,8 +45167,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -45288,8 +45219,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -45461,8 +45391,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -45525,8 +45453,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -45669,8 +45596,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -45733,8 +45658,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -45897,8 +45821,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -45961,8 +45883,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -46134,8 +46055,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -46170,8 +46089,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -46301,8 +46219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -46357,8 +46273,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -46488,8 +46403,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -46573,8 +46486,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -46704,8 +46616,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -46741,8 +46651,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -46777,13 +46685,11 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -46936,8 +46842,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -47018,8 +46922,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -47231,8 +47134,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -47287,8 +47188,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -48470,8 +48370,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -48506,8 +48404,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -50018,8 +49915,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -50054,8 +49949,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -51362,8 +51256,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -51398,8 +51290,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -53038,8 +52929,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -53074,8 +52963,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -55227,8 +55115,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -55263,8 +55149,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -57686,8 +57571,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -57722,8 +57605,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -59896,8 +59778,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -59932,8 +59812,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -62435,8 +62314,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -62471,8 +62348,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -65127,8 +65003,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -65163,8 +65037,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -67911,8 +67784,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -67947,8 +67818,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorReturnContextualType.json b/crates/swc_ecma_parser/tests/tsc/generatorReturnContextualType.json index 0f7c8e8985dd..ca607d362a40 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorReturnContextualType.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorReturnContextualType.json @@ -149,8 +149,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +174,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] }, @@ -338,8 +335,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -365,8 +360,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] }, @@ -527,8 +521,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -554,8 +546,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] }, @@ -716,8 +707,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -743,8 +732,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] }, @@ -947,8 +935,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -974,8 +960,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] }, @@ -1178,8 +1163,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1205,8 +1188,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] }, @@ -1451,8 +1433,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1478,8 +1458,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] }, @@ -1724,8 +1703,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1751,8 +1728,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json index a249b44939b7..28f19f4bd33f 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1013,8 +1010,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1031,8 +1026,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json index d2f58f48a35f..ed5f7901205d 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1013,8 +1010,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1031,8 +1026,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck7.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck7.json index ad7ac790a48f..3bf2abecf979 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck7.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck7.json @@ -92,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -110,8 +108,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json b/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json index b6786921efbd..57a2a085b958 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json @@ -1469,8 +1469,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1487,8 +1485,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1510,8 +1507,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1528,8 +1523,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1551,8 +1545,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1569,8 +1561,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1592,8 +1583,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1610,8 +1599,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1633,8 +1621,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1651,8 +1637,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -1705,8 +1690,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1723,8 +1706,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1746,8 +1728,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1764,8 +1744,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1787,8 +1766,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1805,8 +1782,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1927,8 +1903,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1945,8 +1919,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1968,8 +1941,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1986,8 +1957,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3581,8 +3551,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3599,8 +3567,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3622,8 +3589,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3640,8 +3605,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3663,8 +3627,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3681,8 +3643,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3840,8 +3801,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3858,8 +3817,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3881,8 +3839,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3899,8 +3855,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3922,8 +3877,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3940,8 +3893,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5206,8 +5158,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5224,8 +5174,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -5281,8 +5230,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5307,8 +5254,7 @@ "kind": "any" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5330,8 +5276,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5348,8 +5292,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5371,8 +5314,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5389,8 +5330,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName.json b/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName.json index 281b3258e9a7..cb9cc92138a5 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -186,8 +181,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -299,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -327,8 +319,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -381,8 +372,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -399,8 +388,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -483,8 +471,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -501,8 +487,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -617,8 +602,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -645,8 +628,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -736,8 +718,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -754,8 +734,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -878,8 +857,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -906,8 +883,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName2.json b/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName2.json index e5c59900a7f7..07b151c653a1 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName2.json @@ -113,8 +113,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -141,8 +139,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -225,8 +222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -243,8 +238,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -386,8 +380,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -414,8 +406,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -498,8 +489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -516,8 +505,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json index 097deccabcf9..8457e9507779 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json @@ -100,7 +100,6 @@ "end": 95, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -693,7 +692,6 @@ "end": 392, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1393,7 +1391,6 @@ "end": 752, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1625,7 +1622,6 @@ "end": 843, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2329,7 +2325,6 @@ "end": 1140, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2561,7 +2556,6 @@ "end": 1231, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3372,7 +3366,6 @@ "end": 1591, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3604,7 +3597,6 @@ "end": 1682, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3947,7 +3939,6 @@ "end": 1804, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4803,7 +4794,6 @@ "end": 2164, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5035,7 +5025,6 @@ "end": 2255, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json index de977a14a709..b4da47a3d8dd 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json @@ -3429,7 +3429,6 @@ "end": 1157, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3554,7 +3553,6 @@ "end": 1182, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3679,7 +3677,6 @@ "end": 1210, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3836,7 +3833,6 @@ "end": 1238, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3993,7 +3989,6 @@ "end": 1269, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4173,7 +4168,6 @@ "end": 1290, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4278,7 +4272,6 @@ "end": 1315, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4421,7 +4414,6 @@ "end": 1336, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json index 6c53ad0e56ae..3211e485c53e 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json @@ -4524,7 +4524,6 @@ "end": 1779, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4649,7 +4648,6 @@ "end": 1804, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4774,7 +4772,6 @@ "end": 1848, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4949,7 +4946,6 @@ "end": 1893, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5124,7 +5120,6 @@ "end": 1957, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5340,7 +5335,6 @@ "end": 2011, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5481,7 +5475,6 @@ "end": 2065, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5660,7 +5653,6 @@ "end": 2115, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json index d41d0f60e78b..c371d039cbbf 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -157,8 +155,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -361,8 +358,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -468,8 +463,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -607,8 +601,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -751,8 +743,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -890,8 +881,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -982,8 +971,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1126,8 +1114,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1248,8 +1234,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1529,8 +1514,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1594,8 +1577,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1733,8 +1715,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1770,8 +1750,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json index 5adf420f3a3d..6747d73c1578 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -156,8 +154,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -945,8 +942,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1066,8 +1061,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json index 4b3adf98ea9c..241fb8ae29a8 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json @@ -1100,8 +1100,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1118,8 +1116,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1141,8 +1138,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1159,8 +1154,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1232,8 +1226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1250,8 +1242,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1273,8 +1264,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1291,8 +1280,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json index 3263890abbc4..eaae41b4da2f 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json @@ -304,8 +304,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -322,8 +320,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -345,8 +342,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -363,8 +358,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -436,8 +430,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -454,8 +446,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -477,8 +468,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -495,8 +484,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -726,8 +714,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -744,8 +730,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -817,8 +802,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -835,8 +818,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json index 07062cbd0566..ea8fc057b1e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -100,8 +98,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -123,8 +120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -151,8 +146,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json index 985f3837a1d6..fdeec7314ef3 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json @@ -306,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -334,8 +332,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -357,8 +354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -385,8 +380,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -916,8 +910,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -944,8 +936,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -967,8 +958,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -995,8 +984,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1438,8 +1426,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1466,8 +1452,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1489,8 +1474,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1517,8 +1500,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json index 731a02dc07ce..3fcce02b54b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json @@ -623,8 +623,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -641,8 +639,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json index 28f4fce59b3a..1f4aada4d974 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json @@ -225,8 +225,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -253,8 +251,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -276,8 +273,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -304,8 +299,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -805,8 +799,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -833,8 +825,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json index 15d90f795b43..5453089169da 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json @@ -306,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -334,8 +332,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -357,8 +354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -385,8 +380,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -927,8 +921,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -955,8 +947,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -978,8 +969,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1006,8 +995,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithTupleType.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithTupleType.json index 12c744ead0cc..89230b75a021 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithTupleType.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithTupleType.json @@ -109,8 +109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -184,8 +182,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json b/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json index 0aa404b82640..fc60734494ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json @@ -675,8 +675,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -693,8 +691,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -770,8 +767,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -788,8 +783,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1046,8 +1040,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1064,8 +1056,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1087,8 +1078,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1105,8 +1094,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2099,8 +2087,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2117,8 +2103,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2142,7 +2127,6 @@ "end": 864, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2370,8 +2354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2388,8 +2370,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2647,8 +2628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2665,8 +2644,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2688,8 +2666,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2706,8 +2682,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3000,7 +2975,6 @@ "end": 1098, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json index 0b7a3d164a3e..1830238de83c 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json @@ -85,8 +85,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +111,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes2.json b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes2.json index bb48e41ea1d0..f08904a8b97b 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes2.json @@ -616,8 +616,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -690,8 +688,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -776,8 +773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -803,8 +798,7 @@ "raw": "\"xstate.assign\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -826,8 +820,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -965,8 +957,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1265,8 +1256,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1293,8 +1282,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1316,8 +1304,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1372,8 +1358,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -1712,8 +1697,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1730,8 +1713,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1829,8 +1811,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1847,8 +1827,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes3.json b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes3.json index f7772e697239..97f0d0871678 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes3.json @@ -616,8 +616,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -690,8 +688,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -776,8 +773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -803,8 +798,7 @@ "raw": "\"xstate.assign\"" } } - }, - "typeParams": null + } }, { "type": "TsCallSignatureDeclaration", @@ -1233,8 +1227,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1261,8 +1253,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1284,8 +1275,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1340,8 +1329,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -1680,8 +1668,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1698,8 +1684,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1797,8 +1782,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1815,8 +1798,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json b/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json index 483c6a71a890..4b3fc453f69f 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json @@ -1086,7 +1086,6 @@ "end": 380, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json b/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json index be1633dde708..34c456cca2cb 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json @@ -109,8 +109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -137,8 +135,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -160,8 +157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -188,8 +183,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -341,8 +335,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -359,8 +351,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -382,8 +373,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -400,8 +389,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -729,8 +717,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -757,8 +743,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -780,8 +765,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -808,8 +791,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json b/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json index 832ebf8f0982..3deb65f741f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json +++ b/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json @@ -751,8 +751,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -769,8 +767,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -792,8 +789,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -810,8 +805,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -1192,8 +1186,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1210,8 +1202,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1233,8 +1224,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1251,8 +1240,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -1747,8 +1735,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1765,8 +1751,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1788,8 +1773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1806,8 +1789,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1829,8 +1811,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1847,8 +1827,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json index 5de2d21ce956..eff689f87bd6 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json @@ -10778,8 +10778,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10870,8 +10868,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -10893,8 +10890,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10985,8 +10980,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11008,8 +11002,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11026,8 +11018,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11049,8 +11040,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11067,8 +11056,7 @@ }, "elemTypes": [] } - }, - "typeParams": null + } } ] } @@ -11139,7 +11127,6 @@ "end": 4985, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json index 08175a9e25eb..f66615bfc9d2 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json @@ -6918,8 +6918,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6946,8 +6944,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6969,8 +6966,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6997,8 +6992,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json index 21bc2467b6c6..99f12a6f3d3f 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json @@ -2051,8 +2051,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2069,8 +2067,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/genericTypeAliases.json b/crates/swc_ecma_parser/tests/tsc/genericTypeAliases.json index ad51a600a034..d00d50fe5901 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericTypeAliases.json +++ b/crates/swc_ecma_parser/tests/tsc/genericTypeAliases.json @@ -112,8 +112,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -168,8 +166,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -191,8 +188,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -247,8 +242,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -877,8 +871,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -933,8 +925,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -1047,8 +1038,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1103,8 +1092,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2063,8 +2051,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2091,8 +2077,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2114,8 +2099,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2142,8 +2125,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2394,8 +2376,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2412,8 +2392,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2794,8 +2773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2850,8 +2827,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3144,8 +3120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3200,8 +3174,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json b/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json index 1e45305422e1..c500d7ae13c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithPrivates.json b/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithPrivates.json index f3fa9e70e4d2..83a929dc048b 100644 --- a/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithPrivates.json +++ b/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithPrivates.json @@ -146,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +162,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithPrivates2.json b/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithPrivates2.json index 0e38d7e69be6..b24e269ba3be 100644 --- a/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithPrivates2.json +++ b/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithPrivates2.json @@ -146,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +162,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -811,8 +808,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -829,8 +824,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1524,8 +1518,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1542,8 +1534,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithProtecteds.json b/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithProtecteds.json index cca4a0865df2..8dcb1e62d6eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithProtecteds.json +++ b/crates/swc_ecma_parser/tests/tsc/implementingAnInterfaceExtendingClassWithProtecteds.json @@ -146,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +162,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json b/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json index 8de23ebece39..e079b73e4119 100644 --- a/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/importAliasIdentifiers.json @@ -415,8 +415,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -433,8 +431,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -456,8 +453,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -474,8 +469,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -640,8 +634,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -658,8 +650,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -681,8 +672,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -699,8 +688,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1058,8 +1046,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1076,8 +1062,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1099,8 +1084,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1117,8 +1100,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1310,8 +1292,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1328,8 +1308,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1351,8 +1330,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1369,8 +1346,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1728,8 +1704,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1746,8 +1720,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1769,8 +1742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1787,8 +1758,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json b/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json index 77c2700b6d9b..be723a274494 100644 --- a/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/importStatementsInterfaces.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -263,8 +257,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -281,8 +273,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag1.json b/crates/swc_ecma_parser/tests/tsc/importTag1.json index b34f81069b37..30a107e3f61d 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag1.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag1.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag13.json b/crates/swc_ecma_parser/tests/tsc/importTag13.json index e51093428a2c..90167d6802bf 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag13.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag13.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag2.json b/crates/swc_ecma_parser/tests/tsc/importTag2.json index 17994669712f..8be7e1886149 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag2.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag2.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag3.json b/crates/swc_ecma_parser/tests/tsc/importTag3.json index 3c83e64db883..0804a18f122f 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag3.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag3.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag4.json b/crates/swc_ecma_parser/tests/tsc/importTag4.json index 3743aa8c0c2a..82e997ef3be7 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag4.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag4.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag5.json b/crates/swc_ecma_parser/tests/tsc/importTag5.json index f2a600e3c7f8..5aeb3d0370c1 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag5.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag5.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag6.json b/crates/swc_ecma_parser/tests/tsc/importTag6.json index 4ca570b6a04e..e93679b1c723 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag6.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag6.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -141,8 +138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +154,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag7.json b/crates/swc_ecma_parser/tests/tsc/importTag7.json index 7e589f39fc04..bebe3a2dc8cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag7.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag7.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -141,8 +138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +154,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag8.json b/crates/swc_ecma_parser/tests/tsc/importTag8.json index 7e589f39fc04..bebe3a2dc8cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag8.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag8.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -141,8 +138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +154,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTag9.json b/crates/swc_ecma_parser/tests/tsc/importTag9.json index f028480fe28e..ad780ead2bd5 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTag9.json +++ b/crates/swc_ecma_parser/tests/tsc/importTag9.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -141,8 +138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +154,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeAmbient.json b/crates/swc_ecma_parser/tests/tsc/importTypeAmbient.json index 1f66981964a8..141c8e0a3850 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeAmbient.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeAmbient.json @@ -81,8 +81,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -99,8 +97,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -122,8 +119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +135,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -384,8 +378,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -402,8 +394,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -425,8 +416,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -443,8 +432,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -527,8 +515,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -545,8 +531,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -568,8 +553,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -586,8 +569,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -985,8 +967,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1003,8 +983,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1026,8 +1005,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1044,8 +1021,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1067,8 +1043,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1085,8 +1059,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeAmbientMissing.json b/crates/swc_ecma_parser/tests/tsc/importTypeAmbientMissing.json index c6a456e75c60..ab5c22a8719c 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeAmbientMissing.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeAmbientMissing.json @@ -81,8 +81,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -99,8 +97,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -122,8 +119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +135,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeAmdBundleRewrite.json b/crates/swc_ecma_parser/tests/tsc/importTypeAmdBundleRewrite.json index 6ad3fd4d4a2a..534475dcae99 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeAmdBundleRewrite.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeAmdBundleRewrite.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -88,8 +86,7 @@ "raw": "12" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json b/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json index c03111bacfd4..b70ed688cddf 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -104,8 +102,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -127,8 +124,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -145,8 +140,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -168,8 +162,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -196,8 +188,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -334,8 +325,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -352,8 +341,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -375,8 +363,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -393,8 +379,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -416,8 +401,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -444,8 +427,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -575,8 +557,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -593,8 +573,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -616,8 +595,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -634,8 +611,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -657,8 +633,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -685,8 +659,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1096,8 +1069,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1114,8 +1085,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1347,8 +1317,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1365,8 +1333,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1562,8 +1529,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1580,8 +1545,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1603,8 +1567,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1621,8 +1583,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1644,8 +1605,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1662,8 +1621,7 @@ }, "kind": "object" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1685,8 +1643,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1713,8 +1669,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeInJSDoc.json b/crates/swc_ecma_parser/tests/tsc/importTypeInJSDoc.json index e4dc555331bd..0c80d4243629 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeInJSDoc.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeInJSDoc.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -152,8 +150,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeLocal.json b/crates/swc_ecma_parser/tests/tsc/importTypeLocal.json index 73ae65c0c9f6..0449e01c0d8e 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeLocal.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeLocal.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -219,8 +213,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -237,8 +229,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -260,8 +251,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -278,8 +267,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -377,8 +365,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -395,8 +381,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -418,8 +403,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -436,8 +419,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1013,8 +995,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1031,8 +1011,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1054,8 +1033,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1072,8 +1049,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1095,8 +1071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1113,8 +1087,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeLocalMissing.json b/crates/swc_ecma_parser/tests/tsc/importTypeLocalMissing.json index 15a457aad634..f8495e216ad8 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeLocalMissing.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeLocalMissing.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -219,8 +213,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -237,8 +229,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -260,8 +251,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -278,8 +267,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -377,8 +365,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -395,8 +381,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -418,8 +403,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -436,8 +419,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1158,8 +1140,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1176,8 +1156,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1199,8 +1178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1217,8 +1194,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1240,8 +1216,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1258,8 +1232,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json b/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json index 2c6b8427fd13..912c7855e9d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json +++ b/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json @@ -1520,8 +1520,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1538,8 +1536,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1592,8 +1589,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1610,8 +1605,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/independentPropertyVariance.json b/crates/swc_ecma_parser/tests/tsc/independentPropertyVariance.json index 81429d4e8e15..f27c059f728c 100644 --- a/crates/swc_ecma_parser/tests/tsc/independentPropertyVariance.json +++ b/crates/swc_ecma_parser/tests/tsc/independentPropertyVariance.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -94,8 +92,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -117,8 +114,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -135,8 +130,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -208,8 +202,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -226,8 +218,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -249,8 +240,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +265,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json b/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json index 968578153849..cc095fe2a26c 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json +++ b/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json @@ -308,8 +308,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -336,8 +334,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -871,8 +868,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -955,8 +950,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1150,8 +1144,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1168,8 +1160,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1191,8 +1182,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1209,8 +1198,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/inferTypes2.json b/crates/swc_ecma_parser/tests/tsc/inferTypes2.json index 323813f83033..da62c608db62 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/inferTypes2.json @@ -480,8 +480,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -553,8 +551,7 @@ "kind": "string" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends1.json b/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends1.json index 756826ecf2c3..e9c92b9f1b25 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends1.json +++ b/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends1.json @@ -2523,8 +2523,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2541,8 +2539,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2772,8 +2769,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2790,8 +2785,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -2967,8 +2961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2994,8 +2986,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } } ] } @@ -3094,8 +3085,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3121,8 +3110,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] } @@ -3221,8 +3209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3239,8 +3225,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } @@ -4111,8 +4096,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4159,8 +4142,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -4283,8 +4265,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4331,8 +4311,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -4485,8 +4464,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4512,8 +4489,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } } ] } @@ -4593,8 +4569,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4620,8 +4594,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] } @@ -4701,8 +4674,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4719,8 +4690,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } @@ -4833,8 +4803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4881,8 +4849,7 @@ "default": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4904,8 +4871,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4952,8 +4917,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -5076,8 +5040,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5124,8 +5086,7 @@ "default": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5147,8 +5108,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5195,8 +5154,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -5349,8 +5307,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5376,8 +5332,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5399,8 +5354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5426,8 +5379,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -5507,8 +5459,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5534,8 +5484,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5557,8 +5506,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5584,8 +5531,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] } @@ -5665,8 +5611,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5683,8 +5627,7 @@ }, "kind": "object" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5706,8 +5649,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5724,8 +5665,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } @@ -5805,8 +5745,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5832,8 +5770,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5855,8 +5792,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5882,8 +5817,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] } @@ -5996,8 +5930,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6044,8 +5976,7 @@ "default": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6067,8 +5998,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6107,8 +6036,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -6231,8 +6159,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6279,8 +6205,7 @@ "default": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6302,8 +6227,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6342,8 +6265,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -6496,8 +6418,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6523,8 +6443,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6546,8 +6465,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6573,8 +6490,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -6654,8 +6570,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6681,8 +6595,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6704,8 +6617,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6731,8 +6642,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] } @@ -6812,8 +6722,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6830,8 +6738,7 @@ }, "kind": "object" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6853,8 +6760,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6871,8 +6776,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } @@ -6952,8 +6856,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6979,8 +6881,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7002,8 +6903,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7029,8 +6928,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] } @@ -7143,8 +7041,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7183,8 +7079,7 @@ "default": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7206,8 +7101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7254,8 +7147,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -7378,8 +7270,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7418,8 +7308,7 @@ "default": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7441,8 +7330,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7489,8 +7376,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -7643,8 +7529,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7670,8 +7554,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7693,8 +7576,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7720,8 +7601,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -7801,8 +7681,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7828,8 +7706,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7851,8 +7728,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7878,8 +7753,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] } @@ -7959,8 +7833,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7977,8 +7849,7 @@ }, "kind": "object" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8000,8 +7871,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8018,8 +7887,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } @@ -8099,8 +7967,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8126,8 +7992,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8149,8 +8014,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8176,8 +8039,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends2.json b/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends2.json index c459d38217f9..1ec1a487d756 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends2.json +++ b/crates/swc_ecma_parser/tests/tsc/inferTypesWithExtends2.json @@ -111,8 +111,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +157,7 @@ "default": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -182,8 +179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -230,8 +225,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -370,8 +364,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -410,8 +402,7 @@ "default": null } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -433,8 +424,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -491,8 +480,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json b/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json index 51b0b34fc2ba..0ecd1a730bd6 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json +++ b/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json @@ -725,8 +725,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -753,8 +751,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -776,8 +773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -804,8 +799,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2643,8 +2637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2700,8 +2692,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2723,8 +2714,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2780,8 +2769,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json index 926926a69cfa..76e4e0dd55aa 100644 --- a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json +++ b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -114,8 +112,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -137,8 +134,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -193,8 +188,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -216,8 +210,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -272,8 +264,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -434,8 +425,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -452,8 +441,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation2.json b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation2.json index 44ffcbaa7ce5..ff5fe09127a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation2.json +++ b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation2.json @@ -132,8 +132,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +158,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json index bb2bd3f0f38e..f25df62f07d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -170,8 +168,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -193,8 +190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -221,8 +216,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidOperands.es2015.json b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidOperands.es2015.json index 8252e8e5264e..13d8428c2b4d 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidOperands.es2015.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithInvalidOperands.es2015.json @@ -1950,7 +1950,6 @@ "end": 1146, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -2026,8 +2025,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2044,8 +2041,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2141,8 +2137,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2159,8 +2153,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2280,7 +2273,6 @@ "end": 1307, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json index e1a998a4765c..cfd3edbad7b2 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithRHSHasSymbolHasInstance.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -167,8 +161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -185,8 +177,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -208,8 +199,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -226,8 +215,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -249,8 +237,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +253,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -341,8 +326,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -359,8 +342,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -413,8 +395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -441,8 +421,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -464,8 +443,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -492,8 +469,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -546,7 +522,6 @@ "end": 290, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -682,7 +657,6 @@ "end": 356, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -818,7 +792,6 @@ "end": 429, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -991,7 +964,6 @@ "end": 511, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -1203,7 +1175,6 @@ "end": 592, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -1415,7 +1386,6 @@ "end": 686, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -1646,7 +1616,6 @@ "end": 772, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -7218,8 +7187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7258,8 +7225,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -7874,7 +7840,6 @@ "end": 4281, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -8164,7 +8129,6 @@ "end": 4463, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -8318,7 +8282,6 @@ "end": 4536, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/instantiatedModule.json b/crates/swc_ecma_parser/tests/tsc/instantiatedModule.json index 9ec2edfb1bf9..451a4eaa00bf 100644 --- a/crates/swc_ecma_parser/tests/tsc/instantiatedModule.json +++ b/crates/swc_ecma_parser/tests/tsc/instantiatedModule.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -538,8 +532,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -556,8 +548,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -579,8 +570,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -597,8 +586,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1436,8 +1424,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1454,8 +1440,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1477,8 +1462,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1495,8 +1478,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithPrivates.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithPrivates.json index ed992435c0a3..157e2850b44d 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithPrivates.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithPrivates.json @@ -146,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +162,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +251,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithPrivates2.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithPrivates2.json index 2a94efd8d8cf..e71b7d41e845 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithPrivates2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithPrivates2.json @@ -306,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -324,8 +322,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -489,8 +486,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -507,8 +502,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithProtecteds.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithProtecteds.json index e9e21e00f284..117af3c13880 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithProtecteds.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithProtecteds.json @@ -146,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +162,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +251,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithProtecteds2.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithProtecteds2.json index 9c7a499b7a93..a6e4b1db5639 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithProtecteds2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendingClassWithProtecteds2.json @@ -306,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -324,8 +322,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -489,8 +486,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -507,8 +502,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json index 7c39c0e9b6c1..4b9bc55ca8a7 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -151,8 +148,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -169,8 +164,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -287,8 +281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -305,8 +297,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -611,8 +602,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -629,8 +618,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -703,8 +691,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -721,8 +707,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -795,8 +780,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -813,8 +796,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -887,8 +869,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -905,8 +885,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -979,8 +958,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -997,8 +974,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1071,8 +1047,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1089,8 +1063,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1163,8 +1136,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1181,8 +1152,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2756,8 +2726,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2774,8 +2742,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2848,8 +2815,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2866,8 +2831,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2940,8 +2904,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2958,8 +2920,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3032,8 +2993,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3050,8 +3009,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3143,8 +3101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3161,8 +3117,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -3284,8 +3239,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3302,8 +3255,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3404,8 +3356,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3422,8 +3372,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3524,8 +3473,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3542,8 +3489,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3648,8 +3594,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3666,8 +3610,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3705,8 +3648,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3723,8 +3664,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -4342,8 +4282,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4360,8 +4298,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersectionErrors.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersectionErrors.json index ccb03212e2e5..d8c20ff6f89e 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersectionErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersectionErrors.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -151,8 +148,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -169,8 +164,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -474,8 +468,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -492,8 +484,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -566,8 +557,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -584,8 +573,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -658,8 +646,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -676,8 +662,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -750,8 +735,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -768,8 +751,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -842,8 +824,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -860,8 +840,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2079,8 +2058,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2097,8 +2074,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2171,8 +2147,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2189,8 +2163,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2263,8 +2236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2281,8 +2252,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2695,8 +2665,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2713,8 +2681,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2836,8 +2803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2854,8 +2819,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2956,8 +2920,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2974,8 +2936,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3076,8 +3037,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3094,8 +3053,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3200,8 +3158,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3218,8 +3174,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3257,8 +3212,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3275,8 +3228,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3336,8 +3288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3354,8 +3304,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -3387,8 +3336,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3405,8 +3352,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3481,8 +3427,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3499,8 +3443,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3605,8 +3548,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3623,8 +3564,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceThatHidesBaseProperty.json b/crates/swc_ecma_parser/tests/tsc/interfaceThatHidesBaseProperty.json index 174ed52506f5..a4ade668309a 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceThatHidesBaseProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceThatHidesBaseProperty.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -91,8 +89,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -109,13 +105,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -188,8 +182,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -225,8 +217,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -243,8 +233,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -266,8 +255,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -284,13 +271,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceThatHidesBaseProperty2.json b/crates/swc_ecma_parser/tests/tsc/interfaceThatHidesBaseProperty2.json index ff9d0d8b471f..32330a357f29 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceThatHidesBaseProperty2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceThatHidesBaseProperty2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -91,8 +89,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -109,13 +105,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -188,8 +182,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -225,8 +217,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -243,13 +233,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceThatIndirectlyInheritsFromItself.json b/crates/swc_ecma_parser/tests/tsc/interfaceThatIndirectlyInheritsFromItself.json index f045b73f5549..36b60b2fcbb1 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceThatIndirectlyInheritsFromItself.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceThatIndirectlyInheritsFromItself.json @@ -74,8 +74,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -92,8 +90,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -166,8 +163,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -184,8 +179,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -258,8 +252,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +268,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -437,8 +428,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -455,8 +444,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -589,8 +577,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -607,8 +593,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -741,8 +726,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -759,8 +742,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithCallSignaturesThatHidesBaseSignature.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithCallSignaturesThatHidesBaseSignature.json index 30d914b7c250..d365b4a59b7d 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithCallSignaturesThatHidesBaseSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithCallSignaturesThatHidesBaseSignature.json @@ -77,8 +77,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -95,8 +93,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -197,8 +194,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -215,8 +210,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithCallSignaturesThatHidesBaseSignature2.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithCallSignaturesThatHidesBaseSignature2.json index 61641f9eb80a..efa5fdae6e3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithCallSignaturesThatHidesBaseSignature2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithCallSignaturesThatHidesBaseSignature2.json @@ -77,8 +77,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -95,8 +93,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -118,8 +115,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -136,8 +131,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithConstructSignaturesThatHidesBaseSignature.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithConstructSignaturesThatHidesBaseSignature.json index 5061604d30bc..40b7b7d4dc3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithConstructSignaturesThatHidesBaseSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithConstructSignaturesThatHidesBaseSignature.json @@ -77,8 +77,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -95,8 +93,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -197,8 +194,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -215,8 +210,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithConstructSignaturesThatHidesBaseSignature2.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithConstructSignaturesThatHidesBaseSignature2.json index 41ac23d2bdc6..d2f8aa890799 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithConstructSignaturesThatHidesBaseSignature2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithConstructSignaturesThatHidesBaseSignature2.json @@ -77,8 +77,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -95,8 +93,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -118,8 +115,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -136,8 +131,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes.json index dfa2df742135..7eb63d4d2d3d 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -91,8 +89,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -109,13 +105,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -168,8 +162,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -205,8 +197,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -223,13 +213,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -321,8 +309,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -358,8 +344,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -376,8 +360,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -399,8 +382,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -417,13 +398,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -515,8 +494,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -552,8 +529,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -570,8 +545,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -593,8 +567,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -611,13 +583,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -729,8 +699,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -766,8 +734,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -794,13 +760,11 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -885,8 +849,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -922,8 +884,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -950,13 +910,11 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1116,8 +1074,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1153,8 +1109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1171,8 +1125,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1194,8 +1147,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1212,13 +1163,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1421,8 +1370,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1458,8 +1405,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1486,8 +1431,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1509,8 +1453,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1537,13 +1479,11 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1840,8 +1780,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1877,8 +1815,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1905,8 +1841,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1928,8 +1863,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1956,13 +1889,11 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2142,8 +2073,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2170,8 +2099,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes2.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes2.json index f3de11e165b8..82e3c13ea979 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -91,8 +89,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -109,8 +105,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -132,8 +127,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -150,13 +143,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -209,8 +200,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -246,8 +235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -264,8 +251,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -287,8 +273,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -305,13 +289,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -403,8 +385,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -440,8 +420,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -458,13 +436,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -556,8 +532,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -593,8 +567,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -611,8 +583,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -634,8 +605,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -652,13 +621,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -750,8 +717,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -787,8 +752,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -805,8 +768,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -828,8 +790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -846,13 +806,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json index bbee9d313482..678b3fef977b 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json @@ -281,8 +281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -299,8 +297,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -322,8 +319,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -340,8 +335,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -363,8 +357,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -381,8 +373,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -404,8 +395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -422,8 +411,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -445,8 +433,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -463,8 +449,7 @@ }, "kind": "void" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -486,8 +471,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -512,8 +495,7 @@ "kind": "number" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -535,8 +517,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -563,8 +543,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -586,8 +565,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -650,8 +627,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -673,8 +649,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -789,8 +763,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -812,8 +785,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -840,8 +811,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -863,8 +833,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -891,8 +859,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -914,8 +881,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -942,8 +907,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -965,8 +929,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -993,8 +955,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1016,8 +977,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1034,8 +993,7 @@ }, "members": [] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1057,8 +1015,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1085,8 +1041,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType.json index a951eb998676..2420df776b5f 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType.json @@ -146,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +162,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -412,8 +409,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -430,8 +425,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType2.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType2.json index eb158356c03a..6a76c8368707 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType2.json @@ -134,7 +134,6 @@ "end": 87, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -390,7 +389,6 @@ "end": 190, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer.json index b77ee4a6b7ba..cd2ca228562e 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer.json @@ -100,8 +100,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -118,8 +116,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -152,8 +149,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +184,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -207,8 +200,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -230,8 +222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -248,13 +238,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -373,8 +361,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -391,8 +377,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -414,8 +399,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -432,8 +415,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -466,8 +448,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -503,8 +483,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -521,13 +499,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer2.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer2.json index 3575ea2ca85a..4ded546c4acd 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer2.json @@ -100,8 +100,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -118,8 +116,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -141,8 +138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +154,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -193,8 +187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -230,8 +222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -248,8 +238,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -271,8 +260,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -289,13 +276,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -414,8 +399,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -432,8 +415,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -466,8 +448,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -503,8 +483,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -521,13 +499,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -549,8 +525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -586,8 +560,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -604,13 +576,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer3.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer3.json index fac2f4050053..2b643b85a697 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithStringIndexerHidingBaseTypeIndexer3.json @@ -100,8 +100,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -118,8 +116,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -152,8 +149,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +184,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -207,8 +200,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -230,8 +222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -248,13 +238,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -373,8 +361,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -391,8 +377,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -414,8 +399,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -432,8 +415,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -466,8 +448,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -503,8 +483,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -521,13 +499,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionAndUnionTypes.json b/crates/swc_ecma_parser/tests/tsc/intersectionAndUnionTypes.json index 96118416c41b..de68ad626852 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionAndUnionTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionAndUnionTypes.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -198,8 +192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +208,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -270,8 +261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -288,8 +277,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json b/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json index 6ee548b7d92f..c482a37c2030 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -198,8 +192,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +208,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -520,8 +511,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -538,8 +527,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -561,8 +549,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -579,8 +565,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -681,8 +666,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -709,8 +692,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionIncludingPropFromGlobalAugmentation.json b/crates/swc_ecma_parser/tests/tsc/intersectionIncludingPropFromGlobalAugmentation.json index a16f864cdabc..44bff337252e 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionIncludingPropFromGlobalAugmentation.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionIncludingPropFromGlobalAugmentation.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -100,8 +98,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -180,8 +177,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -198,8 +193,7 @@ }, "kind": "unknown" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionMemberOfUnionNarrowsCorrectly.json b/crates/swc_ecma_parser/tests/tsc/intersectionMemberOfUnionNarrowsCorrectly.json index 207700bbea30..f851c39bdead 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionMemberOfUnionNarrowsCorrectly.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionMemberOfUnionNarrowsCorrectly.json @@ -68,8 +68,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -95,8 +93,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -118,8 +115,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -136,8 +131,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -177,8 +171,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -204,8 +196,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } } ] }, @@ -237,8 +228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -255,8 +244,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -520,8 +508,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -547,8 +533,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionOfUnionNarrowing.json b/crates/swc_ecma_parser/tests/tsc/intersectionOfUnionNarrowing.json index d401f34150b5..3ad4a10725fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionOfUnionNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionOfUnionNarrowing.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -91,8 +89,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -109,13 +105,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -137,8 +131,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -174,8 +166,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -192,13 +182,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -258,8 +246,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +262,7 @@ }, "kind": "object" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -299,8 +284,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -317,8 +300,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } } ] }, @@ -350,8 +332,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -368,8 +348,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -391,8 +370,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -409,8 +386,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json b/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json index 59ae0f1875dc..c044661b2672 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json @@ -967,8 +967,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -985,8 +983,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1057,8 +1054,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1075,8 +1070,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1331,8 +1325,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1349,8 +1341,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1532,8 +1523,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1550,8 +1539,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1651,8 +1639,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1669,8 +1655,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2043,8 +2028,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2070,8 +2053,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2093,8 +2075,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2111,8 +2091,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2164,8 +2143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2191,8 +2168,7 @@ "raw": "'b'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2214,8 +2190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2232,8 +2206,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2285,8 +2258,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2312,8 +2283,7 @@ "raw": "'c'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2335,8 +2305,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2353,8 +2321,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4277,8 +4244,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4304,8 +4269,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4327,8 +4291,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4354,8 +4316,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] }, @@ -4387,8 +4348,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4414,8 +4373,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4437,8 +4395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4464,8 +4420,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -4544,8 +4499,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4571,8 +4524,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4594,8 +4546,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4621,8 +4571,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] }, @@ -4654,8 +4603,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4681,8 +4628,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4704,8 +4650,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4731,8 +4675,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -4812,8 +4755,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4839,8 +4780,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4862,8 +4802,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4889,8 +4827,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] }, @@ -4922,8 +4859,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4949,8 +4884,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4972,8 +4906,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4999,8 +4931,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -5055,8 +4986,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5082,8 +5011,7 @@ "raw": "'d'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5105,8 +5033,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5123,8 +5049,7 @@ }, "kind": "unknown" } - }, - "typeParams": null + } } ] } @@ -5176,8 +5101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5203,8 +5126,7 @@ "raw": "'e'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5226,8 +5148,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5244,8 +5164,7 @@ }, "kind": "unknown" } - }, - "typeParams": null + } } ] } @@ -5316,8 +5235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5344,8 +5261,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6993,8 +6909,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7021,8 +6935,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7515,8 +7428,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7533,8 +7444,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] }, @@ -7822,8 +7732,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7840,8 +7748,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] }, @@ -7982,8 +7889,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8009,8 +7914,7 @@ "raw": "\"A\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8032,8 +7936,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8050,8 +7952,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -8104,8 +8005,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8131,8 +8030,7 @@ "raw": "\"B\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8154,8 +8052,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8172,8 +8068,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -8677,8 +8572,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8732,8 +8625,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionReductionStrict.json b/crates/swc_ecma_parser/tests/tsc/intersectionReductionStrict.json index cad485e72bd7..4a00b7273df0 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionReductionStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionReductionStrict.json @@ -967,8 +967,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -985,8 +983,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1057,8 +1054,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1075,8 +1070,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1331,8 +1325,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1349,8 +1341,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1532,8 +1523,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1550,8 +1539,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1651,8 +1639,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1669,8 +1655,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2043,8 +2028,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2070,8 +2053,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2093,8 +2075,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2111,8 +2091,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2164,8 +2143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2191,8 +2168,7 @@ "raw": "'b'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2214,8 +2190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2232,8 +2206,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2285,8 +2258,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2312,8 +2283,7 @@ "raw": "'c'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2335,8 +2305,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2353,8 +2321,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4277,8 +4244,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4304,8 +4269,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4327,8 +4291,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4354,8 +4316,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] }, @@ -4387,8 +4348,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4414,8 +4373,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4437,8 +4395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4464,8 +4420,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -4544,8 +4499,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4571,8 +4524,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4594,8 +4546,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4621,8 +4571,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] }, @@ -4654,8 +4603,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4681,8 +4628,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4704,8 +4650,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4731,8 +4675,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -4812,8 +4755,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4839,8 +4780,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4862,8 +4802,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4889,8 +4827,7 @@ "raw": "2" } } - }, - "typeParams": null + } } ] }, @@ -4922,8 +4859,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4949,8 +4884,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4972,8 +4906,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4999,8 +4931,7 @@ "raw": "3" } } - }, - "typeParams": null + } } ] } @@ -6241,8 +6172,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6269,8 +6198,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6763,8 +6691,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6781,8 +6707,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] }, @@ -7070,8 +6995,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7088,8 +7011,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json b/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json index 983e518402c8..9215e2729bc0 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -82,7 +79,6 @@ "end": 52, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -165,8 +161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -183,8 +177,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -193,7 +186,6 @@ "end": 105, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -700,8 +692,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -718,8 +708,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1029,7 +1018,6 @@ "end": 430, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1231,8 +1219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1249,8 +1235,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeAssignment.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeAssignment.json index 9f00488167a4..646ccc859754 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeAssignment.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -249,8 +243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +259,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -290,8 +281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -308,8 +297,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -389,8 +377,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -407,8 +393,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -440,8 +425,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -458,8 +441,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeEquivalence.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeEquivalence.json index 216ec2c30043..ca02d20dffaf 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeEquivalence.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeEquivalence.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -198,8 +192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +208,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json index ac98e5f9a553..ff53a9f477f7 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json @@ -827,8 +827,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -855,8 +853,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -941,8 +938,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -969,8 +964,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json index 7b3341d6cd27..04ddc2e2b580 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -100,8 +98,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -248,8 +245,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -266,8 +261,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -299,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -317,8 +309,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -392,8 +383,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -429,8 +418,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -938,8 +926,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -956,8 +942,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -989,8 +974,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1007,8 +990,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference3.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference3.json index 7638bef12cf2..502bcc4f22f7 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference3.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference3.json @@ -161,8 +161,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +187,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeMembers.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeMembers.json index 01ac71c31265..f9e5dfdd1cbe 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeMembers.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -198,8 +192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +208,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -542,8 +533,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -570,8 +559,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -624,8 +612,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -652,8 +638,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -706,8 +691,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -734,8 +717,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1484,8 +1466,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1521,8 +1501,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1558,8 +1536,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1576,13 +1552,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1604,8 +1578,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1641,8 +1613,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1659,18 +1629,15 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1723,8 +1690,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1760,8 +1725,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1797,8 +1760,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1815,13 +1776,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1843,8 +1802,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1880,8 +1837,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1898,18 +1853,15 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2243,8 +2195,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2280,8 +2230,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2317,8 +2265,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2335,18 +2281,15 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2399,8 +2342,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2436,8 +2377,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2473,8 +2412,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2491,18 +2428,15 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeReadonly.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeReadonly.json index 1284495e9950..f6c9445e3e30 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeReadonly.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeReadonly.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -198,8 +192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +208,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -270,8 +261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -288,8 +277,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -342,8 +330,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -360,8 +346,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionWithIndexSignatures.json b/crates/swc_ecma_parser/tests/tsc/intersectionWithIndexSignatures.json index b81f62ce1bec..5b77db9755c5 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionWithIndexSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionWithIndexSignatures.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -124,8 +121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +137,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -209,8 +203,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -266,8 +258,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -347,8 +338,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -375,8 +364,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -408,8 +396,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -436,8 +422,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1018,8 +1003,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1046,8 +1029,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -1079,8 +1061,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1107,8 +1087,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1688,8 +1667,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1706,8 +1683,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2058,8 +2034,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2076,8 +2050,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2099,8 +2072,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2117,8 +2088,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2218,8 +2188,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2236,8 +2204,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2269,8 +2236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2287,8 +2252,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json b/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json index 634be39b9832..3ac54b612fa5 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -124,8 +121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +137,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2995,8 +2989,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3013,8 +3005,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3036,8 +3027,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3054,8 +3043,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -3109,8 +3097,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3135,8 +3121,7 @@ "value": true } } - }, - "typeParams": null + } } ] } @@ -3784,8 +3769,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3802,8 +3785,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -3941,8 +3923,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3959,8 +3939,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/intraExpressionInferences.json b/crates/swc_ecma_parser/tests/tsc/intraExpressionInferences.json index fb4b1c596005..36f4dfc721f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/intraExpressionInferences.json +++ b/crates/swc_ecma_parser/tests/tsc/intraExpressionInferences.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -146,8 +144,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -169,8 +166,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -243,8 +238,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1422,8 +1416,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1496,8 +1488,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1519,8 +1510,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1593,8 +1582,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2008,8 +1996,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2036,8 +2022,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2059,8 +2044,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2133,8 +2116,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2452,8 +2434,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2480,8 +2460,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2503,8 +2482,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2577,8 +2554,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3185,7 +3161,6 @@ "end": 1347, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3235,7 +3210,6 @@ "end": 1365, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3323,7 +3297,6 @@ "end": 1385, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4640,7 +4613,6 @@ "end": 1959, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4689,8 +4661,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4717,8 +4687,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4740,8 +4709,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4768,8 +4735,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4796,8 +4762,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4936,8 +4900,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5734,8 +5697,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5780,8 +5741,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5803,8 +5763,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5877,8 +5835,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6004,8 +5961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6078,8 +6033,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6101,8 +6055,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6175,8 +6127,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -7221,8 +7172,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7332,8 +7281,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7355,8 +7303,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7439,8 +7385,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -7945,8 +7890,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7963,8 +7906,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7986,8 +7928,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8004,8 +7944,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -8697,8 +8636,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8725,8 +8662,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8748,8 +8684,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8859,8 +8793,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8882,8 +8815,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8956,8 +8887,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -9528,8 +9458,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9602,8 +9530,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9625,8 +9552,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9699,8 +9624,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -10122,8 +10046,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10159,8 +10081,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10233,8 +10153,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -10256,8 +10175,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10330,13 +10247,11 @@ } } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -10720,8 +10635,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10794,8 +10707,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -10817,8 +10729,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10891,8 +10801,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -10914,8 +10823,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10988,8 +10895,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -11354,8 +11260,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11428,8 +11332,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11451,8 +11354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11525,8 +11426,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11548,8 +11448,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11622,8 +11520,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11645,8 +11542,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11719,8 +11614,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -12227,8 +12121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12301,8 +12193,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -12324,8 +12215,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12408,8 +12297,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -12431,8 +12319,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12515,8 +12401,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -13125,8 +13010,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13199,8 +13082,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13222,8 +13104,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13259,8 +13139,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13343,8 +13221,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13366,8 +13243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13403,8 +13278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13487,18 +13360,15 @@ } } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -14098,8 +13968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14172,8 +14040,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14195,8 +14062,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14232,8 +14097,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14316,8 +14179,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14339,8 +14201,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14423,8 +14283,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14446,8 +14305,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14483,8 +14340,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14567,18 +14422,15 @@ } } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -15301,8 +15153,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15338,8 +15188,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15375,8 +15223,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15412,8 +15258,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15486,23 +15330,19 @@ } } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -15524,8 +15364,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15598,8 +15436,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json b/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json index 3f020bb50d6b..88a3552e81ee 100644 --- a/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json +++ b/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json @@ -116,8 +116,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -134,8 +132,7 @@ }, "kind": "intrinsic" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json b/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json index 467812f9ca89..6efb17c622b4 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json @@ -460,8 +460,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -478,8 +476,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json index 43673c925ff5..ecad5718f79b 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json @@ -586,8 +586,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -604,8 +602,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -812,7 +809,6 @@ "end": 266, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/invalidImportAliasIdentifiers.json b/crates/swc_ecma_parser/tests/tsc/invalidImportAliasIdentifiers.json index b3eff28982ef..6e5699bad951 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidImportAliasIdentifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidImportAliasIdentifiers.json @@ -318,8 +318,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -336,8 +334,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidInstantiatedModule.json b/crates/swc_ecma_parser/tests/tsc/invalidInstantiatedModule.json index cb18ab48f9bd..e0d2a18d3e37 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidInstantiatedModule.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidInstantiatedModule.json @@ -293,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -311,8 +309,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -334,8 +331,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -352,8 +347,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json b/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json index 37dff272bf94..4aa22eede52c 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json index b02347ebea45..84995ea89a65 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json @@ -478,8 +478,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -496,8 +494,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -631,8 +628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -649,8 +644,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -731,8 +725,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -749,8 +741,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidReturnStatements.json b/crates/swc_ecma_parser/tests/tsc/invalidReturnStatements.json index 6ae1962bac8f..f3de3ddf74be 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidReturnStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidReturnStatements.json @@ -314,8 +314,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -332,8 +330,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json index 65aa3d329f82..c97379da7d40 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json @@ -478,8 +478,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -496,8 +494,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -631,8 +628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -649,8 +644,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -731,8 +725,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -749,8 +741,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json index 8471bc6cece7..059e353c8992 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json @@ -416,8 +416,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -434,8 +432,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json index d12ccd79dd52..a2552cd8d674 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json @@ -556,8 +556,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -574,8 +572,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json index db42705bc436..cd3888bf21a7 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json @@ -485,8 +485,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -503,8 +501,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -638,8 +635,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -656,8 +651,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -738,8 +732,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -756,8 +748,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json b/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json index 7c9c03b31a3f..e547ed4b4131 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json @@ -520,8 +520,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -538,8 +536,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json b/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json index a37dfbd561b9..7a843ee566d3 100644 --- a/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json @@ -85,8 +85,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +111,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5330,8 +5327,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5348,8 +5343,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5371,8 +5365,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5389,8 +5381,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -9642,8 +9633,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9660,8 +9649,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9683,8 +9671,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9701,8 +9687,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassAccessor.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassAccessor.json index 251f77416202..6b45215eea35 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassAccessor.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassAccessor.json @@ -93,8 +93,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -111,8 +109,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -134,8 +131,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -152,8 +147,7 @@ }, "kind": "null" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json index 77cffea206bb..97f3c2e044f7 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json @@ -80,7 +80,6 @@ "end": 182, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassesErr.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassesErr.json index 67821ceda1ed..10527a720b12 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassesErr.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassesErr.json @@ -1405,8 +1405,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1423,8 +1421,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1503,8 +1500,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1521,8 +1516,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1544,8 +1538,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1562,8 +1554,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1720,8 +1711,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1738,8 +1727,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1761,8 +1749,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1779,8 +1765,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1903,8 +1888,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1930,8 +1913,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1953,8 +1935,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1980,8 +1960,7 @@ "raw": "0" } } - }, - "typeParams": null + } } ] } @@ -2104,8 +2083,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2122,8 +2099,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2145,8 +2121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2163,8 +2137,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2243,8 +2216,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2270,8 +2241,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2293,8 +2263,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2320,8 +2288,7 @@ "raw": "0" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json index edad45ebb946..c3ad39cfc28f 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json @@ -99,8 +99,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -117,8 +115,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -234,8 +231,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -291,8 +286,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -314,8 +308,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -342,8 +334,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -365,8 +356,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -422,8 +411,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -445,8 +433,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -473,8 +459,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsCallSignatureDeclaration", @@ -959,7 +944,6 @@ "end": 645, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1039,7 +1023,6 @@ "end": 682, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1207,7 +1190,6 @@ "end": 714, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1275,7 +1257,6 @@ "end": 750, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1365,7 +1346,6 @@ "end": 777, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1791,8 +1771,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1809,8 +1787,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1891,8 +1868,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1909,8 +1884,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2003,8 +1977,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2031,8 +2003,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2173,8 +2144,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2201,8 +2170,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3462,8 +3430,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3480,8 +3446,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3560,8 +3525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3578,8 +3541,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3601,8 +3563,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3619,8 +3579,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3816,8 +3775,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3834,8 +3791,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3857,8 +3813,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3875,8 +3829,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4014,8 +3967,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4041,8 +3992,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4064,8 +4014,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4091,8 +4039,7 @@ "raw": "0" } } - }, - "typeParams": null + } } ] } @@ -4230,8 +4177,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4248,8 +4193,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4271,8 +4215,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4289,8 +4231,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4369,8 +4310,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4396,8 +4335,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4419,8 +4357,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4446,8 +4382,7 @@ "raw": "0" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsTypeReassignmentFromDeclaration.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsTypeReassignmentFromDeclaration.json index 6261835f0c76..22841688f07c 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsTypeReassignmentFromDeclaration.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsTypeReassignmentFromDeclaration.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsTypeReassignmentFromDeclaration2.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsTypeReassignmentFromDeclaration2.json index aa21e43ca5ea..56b6850c7fcb 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsTypeReassignmentFromDeclaration2.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsTypeReassignmentFromDeclaration2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImplements_interface.json b/crates/swc_ecma_parser/tests/tsc/jsdocImplements_interface.json index 5c1d7a359bbe..6ce6109de050 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImplements_interface.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImplements_interface.json @@ -41,7 +41,6 @@ "end": 169, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImplements_interface_multiple.json b/crates/swc_ecma_parser/tests/tsc/jsdocImplements_interface_multiple.json index 0b1badb2b29b..90280c857bb8 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImplements_interface_multiple.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImplements_interface_multiple.json @@ -41,7 +41,6 @@ "end": 173, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -112,7 +111,6 @@ "end": 215, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImplements_namespacedInterface.json b/crates/swc_ecma_parser/tests/tsc/jsdocImplements_namespacedInterface.json index 064f012beeb4..f5dbaf36f9e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImplements_namespacedInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImplements_namespacedInterface.json @@ -68,7 +68,6 @@ "end": 199, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -171,7 +170,6 @@ "end": 245, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImportType.json b/crates/swc_ecma_parser/tests/tsc/jsdocImportType.json index d6cf4c145428..4143c372692e 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImportType.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImportType.json @@ -195,8 +195,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -213,8 +211,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImportType2.json b/crates/swc_ecma_parser/tests/tsc/jsdocImportType2.json index 6b610dfdb765..59b084b35935 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImportType2.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImportType2.json @@ -195,8 +195,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -213,8 +211,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImportTypeReferenceToCommonjsModule.json b/crates/swc_ecma_parser/tests/tsc/jsdocImportTypeReferenceToCommonjsModule.json index 7bc3b1c187dc..04decf37d55b 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImportTypeReferenceToCommonjsModule.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImportTypeReferenceToCommonjsModule.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocThisType.json b/crates/swc_ecma_parser/tests/tsc/jsdocThisType.json index 016d0691d386..e2cc31f6f5bb 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocThisType.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocThisType.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -97,8 +95,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocTypeTag.json b/crates/swc_ecma_parser/tests/tsc/jsdocTypeTag.json index 15404b2baf82..0f81ec3be880 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocTypeTag.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocTypeTag.json @@ -2013,8 +2013,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2031,8 +2029,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json index b4b05a5719da..a5545c9b6458 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json @@ -13203,8 +13203,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13221,8 +13219,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13244,8 +13241,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13262,8 +13257,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] }, @@ -13295,8 +13289,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13313,8 +13305,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13336,8 +13327,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13354,8 +13343,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -13451,8 +13439,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13469,8 +13455,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13492,8 +13477,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13510,8 +13493,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] }, @@ -13543,8 +13525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13561,8 +13541,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13584,8 +13563,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13602,8 +13579,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -13699,8 +13675,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13717,8 +13691,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13740,8 +13713,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13758,8 +13729,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] }, @@ -13791,8 +13761,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13809,8 +13777,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13832,8 +13799,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13850,8 +13815,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -17724,8 +17688,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -17761,8 +17723,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -17779,13 +17739,11 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] }, @@ -18081,8 +18039,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -18118,8 +18074,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -18136,13 +18090,11 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] }, @@ -18790,8 +18742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -18808,8 +18758,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -20315,8 +20264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20333,8 +20280,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -20356,8 +20302,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20374,8 +20318,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -25041,8 +24984,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -25078,8 +25019,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -25096,8 +25035,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -25119,8 +25057,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -25137,13 +25073,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -25165,8 +25099,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -25183,8 +25115,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -27088,8 +27019,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -27116,8 +27045,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -27139,8 +27067,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -27167,8 +27093,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -27918,8 +27843,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -27946,8 +27869,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -27969,8 +27891,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -27997,8 +27917,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -28522,8 +28441,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -28540,8 +28457,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -28845,8 +28761,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -28863,8 +28777,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -28886,8 +28799,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -28912,8 +28823,7 @@ "kind": "any" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -28935,8 +28845,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -28953,8 +28861,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -29282,8 +29189,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -29309,8 +29214,7 @@ "raw": "\"someMethod\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -29332,8 +29236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -29387,8 +29289,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -29410,8 +29311,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -29436,8 +29335,7 @@ "kind": "string" } } - }, - "typeParams": null + } } ] } @@ -30047,8 +29945,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -30130,8 +30026,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -30254,8 +30149,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -30272,8 +30165,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -32006,8 +31898,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -32024,8 +31914,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -32296,8 +32185,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -32314,8 +32201,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -33312,8 +33198,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -33330,8 +33214,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -35007,8 +34890,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -35025,8 +34906,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -35243,8 +35123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -35280,8 +35158,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -35298,13 +35174,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -35326,8 +35200,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -35363,8 +35235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -35381,13 +35251,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -35606,8 +35474,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -35624,8 +35490,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -35949,8 +35814,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -35986,8 +35849,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -36004,13 +35865,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -36032,8 +35891,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -36069,8 +35926,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -36087,13 +35942,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -36432,8 +36285,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -36450,8 +36301,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -36889,8 +36739,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -36907,8 +36755,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -36940,8 +36787,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -36958,8 +36803,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -37338,8 +37182,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -37356,8 +37198,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -38235,8 +38076,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -38253,8 +38092,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -40083,8 +39921,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -40101,8 +39937,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json index c0134f55c454..03aed096e95d 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -113,8 +110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -168,8 +163,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -191,8 +185,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -209,8 +201,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1081,8 +1072,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1099,8 +1088,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1122,8 +1110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1140,8 +1126,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3275,8 +3260,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3293,8 +3276,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3316,8 +3298,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3334,8 +3314,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5120,8 +5099,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5157,8 +5134,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -5393,8 +5369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5457,8 +5431,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5480,8 +5453,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5631,8 +5602,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -6594,8 +6564,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6621,8 +6589,7 @@ "raw": "123" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6644,8 +6611,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6671,8 +6636,7 @@ "raw": "\"some string\"" } } - }, - "typeParams": null + } } ] } @@ -8153,8 +8117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8199,8 +8161,7 @@ ] } } - }, - "typeParams": null + } } ] }, @@ -8232,8 +8193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8278,8 +8237,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json index c462cca529ad..8141e714316f 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json @@ -1454,8 +1454,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1472,8 +1470,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -7050,8 +7047,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7068,8 +7063,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7091,8 +7085,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7128,8 +7120,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json b/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json index d99d095daabc..c0a584e0cd73 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json b/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json index 256f7a4bd0cb..28524dea9769 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json @@ -1580,8 +1580,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1598,8 +1596,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1621,8 +1618,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1639,8 +1634,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1693,8 +1687,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1711,8 +1703,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1734,8 +1725,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1771,8 +1760,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/keyofIntersection.json b/crates/swc_ecma_parser/tests/tsc/keyofIntersection.json index 03138328bcb9..888c58936e9e 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofIntersection.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -124,8 +121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +137,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/libReferenceNoLib.json b/crates/swc_ecma_parser/tests/tsc/libReferenceNoLib.json index 4dbd885be11d..cbcfd48838bc 100644 --- a/crates/swc_ecma_parser/tests/tsc/libReferenceNoLib.json +++ b/crates/swc_ecma_parser/tests/tsc/libReferenceNoLib.json @@ -333,8 +333,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -351,8 +349,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/libReferenceNoLibBundle.json b/crates/swc_ecma_parser/tests/tsc/libReferenceNoLibBundle.json index d20f7172e528..fdd2cd69e436 100644 --- a/crates/swc_ecma_parser/tests/tsc/libReferenceNoLibBundle.json +++ b/crates/swc_ecma_parser/tests/tsc/libReferenceNoLibBundle.json @@ -333,8 +333,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -351,8 +349,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/library-reference-1.json b/crates/swc_ecma_parser/tests/tsc/library-reference-1.json index 9c517a6f6346..2f8179056aad 100644 --- a/crates/swc_ecma_parser/tests/tsc/library-reference-1.json +++ b/crates/swc_ecma_parser/tests/tsc/library-reference-1.json @@ -54,7 +54,6 @@ "end": 202, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/library-reference-14.json b/crates/swc_ecma_parser/tests/tsc/library-reference-14.json index 368a50893bfd..9c276d8bf82c 100644 --- a/crates/swc_ecma_parser/tests/tsc/library-reference-14.json +++ b/crates/swc_ecma_parser/tests/tsc/library-reference-14.json @@ -54,7 +54,6 @@ "end": 195, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/library-reference-15.json b/crates/swc_ecma_parser/tests/tsc/library-reference-15.json index 64a95a42e740..7dc02dcb0ac5 100644 --- a/crates/swc_ecma_parser/tests/tsc/library-reference-15.json +++ b/crates/swc_ecma_parser/tests/tsc/library-reference-15.json @@ -54,7 +54,6 @@ "end": 170, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -144,7 +143,6 @@ "end": 246, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/library-reference-3.json b/crates/swc_ecma_parser/tests/tsc/library-reference-3.json index 3e24cfebe0db..542e191d7085 100644 --- a/crates/swc_ecma_parser/tests/tsc/library-reference-3.json +++ b/crates/swc_ecma_parser/tests/tsc/library-reference-3.json @@ -54,7 +54,6 @@ "end": 202, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/library-reference-6.json b/crates/swc_ecma_parser/tests/tsc/library-reference-6.json index 5f9e028acee1..510f2fe0e48c 100644 --- a/crates/swc_ecma_parser/tests/tsc/library-reference-6.json +++ b/crates/swc_ecma_parser/tests/tsc/library-reference-6.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/library-reference-7.json b/crates/swc_ecma_parser/tests/tsc/library-reference-7.json index cb01b5717e9c..c180d19b8af5 100644 --- a/crates/swc_ecma_parser/tests/tsc/library-reference-7.json +++ b/crates/swc_ecma_parser/tests/tsc/library-reference-7.json @@ -54,7 +54,6 @@ "end": 199, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/library-reference-8.json b/crates/swc_ecma_parser/tests/tsc/library-reference-8.json index 7cf70a98305b..a83ec71da23d 100644 --- a/crates/swc_ecma_parser/tests/tsc/library-reference-8.json +++ b/crates/swc_ecma_parser/tests/tsc/library-reference-8.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json b/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json index ecde06501269..cc1303b0ab6b 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json @@ -5699,8 +5699,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5727,8 +5725,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6451,8 +6448,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6469,8 +6464,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6492,8 +6486,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6510,8 +6502,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypes2.json b/crates/swc_ecma_parser/tests/tsc/literalTypes2.json index 71744a3a1cfa..1e74c39f547b 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypes2.json @@ -3087,8 +3087,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3114,8 +3112,7 @@ "raw": "123" } } - }, - "typeParams": null + } } ] } @@ -4734,8 +4731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4789,8 +4784,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4812,8 +4806,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4867,8 +4859,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -5083,8 +5074,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5138,8 +5127,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5161,8 +5149,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5216,8 +5202,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypesAndDestructuring.json b/crates/swc_ecma_parser/tests/tsc/literalTypesAndDestructuring.json index 838384055e3b..b36f0a68beb9 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypesAndDestructuring.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypesAndDestructuring.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -131,8 +129,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -826,8 +823,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -890,8 +885,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes1.json b/crates/swc_ecma_parser/tests/tsc/localTypes1.json index 418b11252985..22c5830458b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes1.json @@ -243,8 +243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -271,8 +269,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -804,8 +801,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -832,8 +827,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1458,8 +1452,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1486,8 +1478,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1887,8 +1878,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1915,8 +1904,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes4.json b/crates/swc_ecma_parser/tests/tsc/localTypes4.json index 713769d5caa6..6fbe1e611e89 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes4.json @@ -616,8 +616,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -634,8 +632,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -826,8 +823,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -844,8 +839,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment2.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment2.json index 0351feb66181..b7c785e67678 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment2.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -78,7 +76,6 @@ "end": 157, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -127,8 +124,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -227,8 +222,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -255,8 +249,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -355,13 +347,11 @@ } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -383,8 +373,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -483,8 +471,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment3.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment3.json index 609cbbfe2c87..573016197191 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment3.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment3.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -154,8 +152,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment4.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment4.json index a8419dc41550..081f9fe40f97 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment4.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment4.json @@ -818,8 +818,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -836,8 +834,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -859,8 +856,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -887,8 +882,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment8.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment8.json index 9361c36f8cf0..0f919789208a 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment8.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment8.json @@ -75,8 +75,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -101,8 +99,7 @@ "kind": "number" } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAssignment9.json b/crates/swc_ecma_parser/tests/tsc/logicalAssignment9.json index 62b39220b543..59d9efe2a5ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAssignment9.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAssignment9.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/logicalOrExpressionIsContextuallyTyped.json b/crates/swc_ecma_parser/tests/tsc/logicalOrExpressionIsContextuallyTyped.json index 82031651fecb..4b88a480eefb 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalOrExpressionIsContextuallyTyped.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalOrExpressionIsContextuallyTyped.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json index c8298ddb829d..dc7a4138a5fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json @@ -1478,8 +1478,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1496,8 +1494,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1596,8 +1593,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1614,8 +1609,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1637,8 +1631,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1655,8 +1647,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1710,8 +1701,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1728,8 +1717,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1751,8 +1739,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1769,8 +1755,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/looseThisTypeInFunctions.json b/crates/swc_ecma_parser/tests/tsc/looseThisTypeInFunctions.json index 86e5e9cbf76f..ad85506e8a8b 100644 --- a/crates/swc_ecma_parser/tests/tsc/looseThisTypeInFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/looseThisTypeInFunctions.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -82,7 +79,6 @@ "end": 128, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -207,7 +203,6 @@ "end": 188, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json index c67c89d15d91..d0ee7cddbdd9 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json @@ -363,8 +363,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -381,8 +379,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -404,8 +401,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -422,8 +417,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -445,8 +439,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -482,8 +474,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -500,13 +490,11 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -633,8 +621,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -661,8 +647,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -684,8 +669,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -712,8 +695,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1047,8 +1029,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1074,8 +1054,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1097,8 +1076,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1115,8 +1092,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1148,8 +1124,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1175,8 +1149,7 @@ "raw": "'b'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1198,8 +1171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1216,8 +1187,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -1249,8 +1219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1276,8 +1244,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1299,8 +1266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1317,8 +1282,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -1807,7 +1771,6 @@ "end": 852, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1847,7 +1810,6 @@ "end": 877, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1928,8 +1890,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1965,8 +1925,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2356,8 +2315,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2374,8 +2331,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2397,8 +2353,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2415,8 +2369,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2652,8 +2605,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2670,8 +2621,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2693,8 +2643,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2711,8 +2659,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3053,8 +3000,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3071,8 +3016,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3094,8 +3038,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3112,8 +3054,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3135,8 +3076,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3153,8 +3092,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3273,8 +3211,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3291,8 +3227,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3314,8 +3249,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3332,8 +3265,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3953,8 +3885,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3971,8 +3901,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3994,8 +3923,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4012,8 +3939,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4035,8 +3961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4063,8 +3987,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4086,8 +4009,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4122,8 +4043,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -4176,8 +4096,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4194,8 +4112,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4217,8 +4134,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4235,8 +4150,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4289,8 +4203,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4344,8 +4256,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4367,8 +4278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4385,8 +4294,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6616,8 +6524,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6634,8 +6540,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -6687,8 +6592,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6724,8 +6627,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6742,8 +6643,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6765,8 +6665,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6793,13 +6691,11 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6821,8 +6717,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6849,8 +6743,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7625,8 +7518,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7643,8 +7534,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7666,8 +7556,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7684,8 +7572,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7916,8 +7803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7943,8 +7828,7 @@ "raw": "'x'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7966,8 +7850,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7993,8 +7875,7 @@ "raw": "'y'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8016,8 +7897,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8043,8 +7922,7 @@ "raw": "'z'" } } - }, - "typeParams": null + } } ] } @@ -11349,8 +11227,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11376,8 +11252,7 @@ "raw": "\"apple\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11399,8 +11274,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11426,8 +11299,7 @@ "raw": "\"red\"" } } - }, - "typeParams": null + } } ] }, @@ -11459,8 +11331,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11486,8 +11356,7 @@ "raw": "\"banana\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11509,8 +11378,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11536,8 +11403,7 @@ "raw": "\"yellow\"" } } - }, - "typeParams": null + } } ] }, @@ -11569,8 +11435,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11596,8 +11460,7 @@ "raw": "\"orange\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11619,8 +11482,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11646,8 +11507,7 @@ "raw": "\"orange\"" } } - }, - "typeParams": null + } } ] } @@ -11728,8 +11588,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11765,8 +11623,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11788,8 +11645,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11825,8 +11680,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -12114,8 +11968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12151,8 +12003,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -12174,8 +12025,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12211,8 +12060,7 @@ } ] } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json index 8a0441eed867..1bdc1497365e 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json @@ -279,8 +279,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -297,8 +295,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -320,8 +317,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -338,8 +333,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -622,8 +616,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -640,8 +632,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -663,8 +654,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -681,8 +670,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -985,8 +973,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1003,8 +989,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1026,8 +1011,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1044,8 +1027,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1099,8 +1081,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1117,8 +1097,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1140,8 +1119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1158,8 +1135,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1534,8 +1510,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1552,8 +1526,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1575,8 +1548,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1593,8 +1564,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1648,8 +1618,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1666,8 +1634,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1689,8 +1656,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1707,8 +1672,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2045,8 +2009,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2063,8 +2025,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2086,8 +2047,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2104,8 +2063,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -2162,8 +2120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2180,8 +2136,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2203,8 +2158,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2221,8 +2174,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints2.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints2.json index c3fe5fa17834..fe4f0e5a2053 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints2.json @@ -144,8 +144,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -172,8 +170,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -389,8 +386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -417,8 +412,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -709,8 +703,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -737,8 +729,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -996,8 +987,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1024,8 +1013,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1302,8 +1290,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1330,8 +1316,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1575,8 +1560,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1603,8 +1586,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3939,8 +3921,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3957,8 +3937,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3980,8 +3959,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3998,8 +3975,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json index dcfdef42ee72..c864e5170d64 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -136,8 +130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -154,8 +146,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -177,8 +168,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -195,8 +184,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -249,8 +237,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +253,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -321,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -339,8 +322,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -362,8 +344,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -380,8 +360,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5415,8 +5394,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5433,8 +5410,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5456,8 +5432,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5474,8 +5448,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7685,8 +7658,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7703,8 +7674,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -8284,8 +8254,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8392,8 +8360,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8415,8 +8382,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8523,8 +8488,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -8576,8 +8540,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8594,8 +8556,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8617,8 +8578,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8635,8 +8594,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors2.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors2.json index 38dfb124537e..4c13d6b6daaf 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors2.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors2.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -80,8 +78,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -103,8 +100,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -130,8 +125,7 @@ "raw": "'a'" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeIndexSignatureModifiers.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeIndexSignatureModifiers.json index 8d5b84fa238f..5cfb1541dd86 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeIndexSignatureModifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeIndexSignatureModifiers.json @@ -236,8 +236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -263,8 +261,7 @@ "raw": "'hello'" } } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json index 33b42c9e45b5..e40222100009 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json @@ -258,8 +258,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -286,8 +284,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -309,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -365,8 +360,7 @@ ] } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json index 618f3e12d298..32642c3d93c6 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -94,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -112,8 +107,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -165,8 +159,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -183,8 +175,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -206,8 +197,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -224,8 +213,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -277,8 +265,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -295,8 +281,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -318,8 +303,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -336,8 +319,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -389,8 +371,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -407,8 +387,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -430,8 +409,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -448,8 +425,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3432,8 +3408,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3488,8 +3462,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -3542,8 +3515,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3579,8 +3550,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3597,13 +3566,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3625,8 +3592,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3662,8 +3627,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3680,13 +3643,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -3738,8 +3699,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3775,8 +3734,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3793,13 +3750,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3821,8 +3776,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3858,8 +3811,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3876,13 +3827,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -3934,8 +3883,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3971,8 +3918,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3989,13 +3934,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4017,8 +3960,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4054,8 +3995,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4072,13 +4011,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -4130,8 +4067,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4167,8 +4102,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4185,13 +4118,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4213,8 +4144,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4250,8 +4179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4268,13 +4195,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -7165,8 +7090,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7183,8 +7106,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeOverlappingStringEnumKeys.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeOverlappingStringEnumKeys.json index 014b9e5ae45b..7440c59c49bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeOverlappingStringEnumKeys.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeOverlappingStringEnumKeys.json @@ -266,8 +266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -307,8 +305,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -330,8 +327,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -348,8 +343,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -402,8 +396,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -443,8 +435,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -466,8 +457,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -484,8 +473,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -707,8 +695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -735,8 +721,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json index e10c7097dddb..982645f83e96 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json @@ -6034,8 +6034,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6052,8 +6050,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6075,8 +6072,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6093,8 +6088,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -7294,8 +7288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7312,8 +7304,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -14120,8 +14111,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14138,8 +14127,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -14290,8 +14278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14308,8 +14294,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] }, @@ -14421,8 +14406,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14458,8 +14441,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14476,13 +14457,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14504,8 +14483,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14541,8 +14518,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14559,13 +14534,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -14719,8 +14692,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14747,8 +14718,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json index dcc480a9c5ed..315361decf00 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -703,8 +700,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -721,8 +716,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes1.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes1.json index 97dcd7c4dcdc..358394999d28 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes1.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -94,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -112,8 +107,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -135,8 +129,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -153,8 +145,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json index 5588790eb023..b24dfed5b56a 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json @@ -1144,7 +1144,6 @@ "end": 384, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1194,7 +1193,6 @@ "end": 409, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2882,8 +2880,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2900,8 +2896,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2923,8 +2918,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2941,8 +2934,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2995,8 +2987,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3013,8 +3003,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3036,8 +3025,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3054,8 +3041,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3077,8 +3063,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3095,8 +3079,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3118,8 +3101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3146,8 +3127,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3200,8 +3180,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3218,8 +3196,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3241,8 +3218,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3259,8 +3234,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3282,8 +3256,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3300,8 +3272,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3323,8 +3294,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3351,8 +3320,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3405,8 +3373,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3423,8 +3389,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3446,8 +3411,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3464,8 +3427,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3487,8 +3449,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3505,8 +3465,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3528,8 +3487,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3556,8 +3513,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json index b1403c92a89b..96e5fee4c525 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json @@ -674,8 +674,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -692,8 +690,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -715,8 +712,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -733,8 +728,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -787,8 +781,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -833,8 +825,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -856,8 +847,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -902,8 +891,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json index da99b535245c..7ba9607915b6 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json @@ -849,8 +849,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -867,8 +865,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -920,8 +917,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -938,8 +933,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -991,8 +985,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1009,8 +1001,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2701,8 +2692,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2719,8 +2708,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2742,8 +2730,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2779,8 +2765,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2797,8 +2781,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2820,8 +2803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2838,13 +2819,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2866,8 +2845,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2884,8 +2861,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -2937,8 +2913,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2955,8 +2929,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2978,8 +2951,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3015,8 +2986,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3033,8 +3002,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3056,8 +3024,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3074,13 +3040,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3102,8 +3066,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3120,8 +3082,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -3319,8 +3280,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3337,8 +3296,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json index 6007ffe2d639..17a71f59da0a 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json @@ -2406,8 +2406,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2490,8 +2488,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2513,8 +2510,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2597,8 +2592,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2700,8 +2694,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2784,8 +2776,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2807,8 +2798,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2891,8 +2880,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3533,8 +3521,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3551,8 +3537,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3574,8 +3559,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3592,8 +3575,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3645,8 +3627,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3729,8 +3709,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3752,8 +3731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3836,8 +3813,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3889,8 +3865,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3973,8 +3947,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3996,8 +3969,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4080,8 +4051,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json index 9487a35f128b..f013cf063579 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json @@ -5597,8 +5597,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5615,8 +5613,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5638,8 +5635,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5675,8 +5670,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5698,8 +5692,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5716,8 +5708,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5739,8 +5730,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5776,8 +5765,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -7027,8 +7015,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7045,8 +7031,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7068,8 +7053,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7086,8 +7069,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json b/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json index a87f10982da1..eb71d83994f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json @@ -972,8 +972,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1047,8 +1045,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1070,8 +1067,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1088,8 +1083,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1111,8 +1105,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1129,8 +1121,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1235,8 +1226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1263,8 +1252,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1317,8 +1305,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1335,8 +1321,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1358,8 +1343,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1376,8 +1359,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1458,8 +1440,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1514,8 +1494,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -1620,8 +1599,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1676,8 +1653,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json b/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json index 53b5661f86e1..85c4827682ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json @@ -85,8 +85,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +111,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1986,8 +1983,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2004,8 +1999,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2057,8 +2051,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2075,8 +2067,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3565,8 +3556,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3611,8 +3600,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3634,8 +3622,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3688,8 +3674,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -4349,8 +4334,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4386,8 +4369,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4409,8 +4391,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4435,8 +4415,7 @@ "kind": "string" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples.json b/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples.json index 7a16b9728809..2740f36cfade 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesGenericTuples.json @@ -760,8 +760,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -778,8 +776,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -831,8 +828,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -849,8 +844,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -902,8 +896,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -920,8 +912,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -973,8 +964,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -991,8 +980,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces.json b/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces.json index 3ef1306ca0e7..16061032edf1 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -198,8 +192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +208,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -541,8 +532,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -569,8 +558,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -655,8 +643,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -683,8 +669,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -769,8 +754,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -797,8 +780,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1135,8 +1117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1153,8 +1133,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1207,8 +1186,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1225,8 +1202,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1279,8 +1255,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1297,8 +1271,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -1622,8 +1595,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1650,8 +1621,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1736,8 +1706,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1764,8 +1732,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1850,8 +1817,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1878,8 +1843,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces2.json b/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces2.json index b9a9de3bd73d..64b8fc3d06a4 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces2.json +++ b/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces2.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -377,8 +374,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -395,8 +390,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -457,8 +451,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -475,8 +467,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -840,8 +831,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -858,8 +847,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1167,8 +1155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1185,8 +1171,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1554,8 +1539,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1572,8 +1555,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces.json b/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces.json index ef64636d4064..1f7fc37ac0b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -409,8 +403,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -427,8 +419,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -450,8 +441,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -478,8 +467,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -564,8 +552,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -592,8 +578,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -870,8 +855,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -888,8 +871,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -942,8 +924,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -960,8 +940,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1225,8 +1204,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1253,8 +1230,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1339,8 +1315,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1367,8 +1341,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces2.json b/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces2.json index 4e0b06c0fb3c..5566f35e0546 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces2.json +++ b/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces2.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -377,8 +374,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -395,8 +390,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -700,8 +694,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -718,8 +710,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1027,8 +1018,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1045,8 +1034,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedClassInterface.json b/crates/swc_ecma_parser/tests/tsc/mergedClassInterface.json index 037991950960..bd6402e529ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedClassInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedClassInterface.json @@ -278,8 +278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -296,8 +294,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -422,8 +419,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -440,8 +435,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -494,8 +488,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -512,8 +504,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInheritedClassInterface.json b/crates/swc_ecma_parser/tests/tsc/mergedInheritedClassInterface.json index d5e441b00b66..2f974eef7854 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInheritedClassInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInheritedClassInterface.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -305,8 +299,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -323,8 +315,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -524,8 +515,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -542,8 +531,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInheritedMembersSatisfyAbstractBase.json b/crates/swc_ecma_parser/tests/tsc/mergedInheritedMembersSatisfyAbstractBase.json index 073a3ac50d42..547152584765 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInheritedMembersSatisfyAbstractBase.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInheritedMembersSatisfyAbstractBase.json @@ -161,8 +161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -179,8 +177,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -364,8 +361,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -382,8 +377,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames.json index 20bc995dc530..e0815b156b19 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -257,8 +251,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -285,8 +277,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -371,8 +362,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -389,8 +378,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -505,8 +493,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -533,8 +519,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -649,8 +634,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -667,8 +650,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -790,8 +772,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -818,8 +798,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -942,8 +921,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -960,8 +937,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames2.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames2.json index c8c9c3d6c6e1..c6ae6e4d231f 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames2.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -257,8 +251,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -285,8 +277,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -371,8 +362,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -399,8 +388,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -515,8 +503,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -543,8 +529,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -659,8 +644,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -687,8 +670,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -810,8 +792,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -838,8 +818,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -962,8 +941,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -990,8 +967,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithIndexers.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithIndexers.json index 82911ded59ab..642894bbd4f9 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithIndexers.json @@ -187,8 +187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -205,8 +203,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithIndexers2.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithIndexers2.json index cbdb473738f0..1bbd0cc11cde 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithIndexers2.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithIndexers2.json @@ -187,8 +187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -205,8 +203,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -326,8 +323,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -344,8 +339,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -444,8 +438,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -462,8 +454,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -496,8 +487,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -533,8 +522,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -551,13 +538,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates.json index 3b60e73410a2..ff1ea5e6b838 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates.json @@ -146,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +162,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -218,8 +215,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +231,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates2.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates2.json index 1af6fcd402a9..b145d0d790c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates2.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates2.json @@ -218,8 +218,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +234,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -310,8 +307,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -328,8 +323,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates3.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates3.json index 71c66e2600e2..270a5a31e870 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates3.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithInheritedPrivates3.json @@ -218,8 +218,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +234,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -310,8 +307,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -328,8 +323,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -719,8 +713,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -737,8 +729,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -811,8 +802,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -829,8 +818,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases.json index 123d15ef56d0..2fef884ec4fc 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases.json @@ -218,8 +218,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +234,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -310,8 +307,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -328,8 +323,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1063,8 +1057,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1091,8 +1083,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1215,8 +1206,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1243,8 +1232,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases2.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases2.json index c5a21ac9f569..f7a025dbe904 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases2.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases2.json @@ -381,8 +381,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -399,8 +397,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -492,8 +489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -510,8 +505,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1610,8 +1604,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1638,8 +1630,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1799,8 +1790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1827,8 +1816,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases3.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases3.json index df92e0ebd285..d462e34047b9 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases3.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases3.json @@ -617,8 +617,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -645,8 +643,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -806,8 +803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -834,8 +829,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases4.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases4.json index 656748229a0d..baa3a2d6e7b9 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases4.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases4.json @@ -617,8 +617,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -645,8 +643,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -806,8 +803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -834,8 +829,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json index c3f2e2b6e9cb..8f7680bbe3ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json @@ -54,7 +54,6 @@ "end": 119, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -122,7 +121,6 @@ "end": 149, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -203,8 +201,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -332,8 +328,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -392,7 +387,6 @@ "end": 303, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -502,7 +496,6 @@ "end": 333, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -625,8 +618,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -838,8 +829,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json index b029cc1632d0..0c99e4705c81 100644 --- a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json @@ -54,7 +54,6 @@ "end": 119, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -122,7 +121,6 @@ "end": 150, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -203,8 +201,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -332,8 +328,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -538,7 +533,6 @@ "end": 325, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -648,7 +642,6 @@ "end": 355, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -771,8 +764,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -984,8 +975,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json index e27a2f82e6d0..e52cb07dd88e 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json @@ -41,7 +41,6 @@ "end": 85, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json index 78f83645761b..f9940a878e96 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json @@ -41,7 +41,6 @@ "end": 86, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json b/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json index 330fc17d437e..bfed99846de9 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json @@ -4783,8 +4783,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4801,8 +4799,7 @@ }, "kind": "void" } - }, - "typeParams": null + } } ] } @@ -4862,8 +4859,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4880,8 +4875,7 @@ }, "kind": "void" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4903,8 +4897,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4921,8 +4913,7 @@ }, "kind": "void" } - }, - "typeParams": null + } } ] } @@ -5147,8 +5138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5165,8 +5154,7 @@ }, "kind": "void" } - }, - "typeParams": null + } } ] } @@ -5226,8 +5214,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5244,8 +5230,7 @@ }, "kind": "void" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5267,8 +5252,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5285,8 +5268,7 @@ }, "kind": "void" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json index 51923362d2f5..032e838980cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json @@ -549,7 +549,6 @@ "end": 301, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1053,8 +1052,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1071,8 +1068,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1151,8 +1147,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1169,8 +1163,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportAlias2.json b/crates/swc_ecma_parser/tests/tsc/moduleExportAlias2.json index bb28dfd0344b..fa4d432cc69a 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportAlias2.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportAlias2.json @@ -195,8 +195,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -213,8 +211,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment.json b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment.json index 817510d5ab51..e37814e4e9c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment2.json b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment2.json index f404a769e5f7..83e41e3fe7ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment2.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment2.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment3.json b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment3.json index 29f456c5909e..a1ead4e43a9b 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment3.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment3.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment4.json b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment4.json index 3130f45cf3aa..5b78500647ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment4.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleExportWithExportPropertyAssignment4.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json b/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json index 95ee89e8ecbf..ca8f8c5a373a 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json @@ -267,8 +267,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -285,8 +283,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1496,8 +1493,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1514,8 +1509,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nameCollision.json b/crates/swc_ecma_parser/tests/tsc/nameCollision.json index 07ba9b19810f..ed1dd326229d 100644 --- a/crates/swc_ecma_parser/tests/tsc/nameCollision.json +++ b/crates/swc_ecma_parser/tests/tsc/nameCollision.json @@ -810,8 +810,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -828,8 +826,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/narrowExceptionVariableInCatchClause.json b/crates/swc_ecma_parser/tests/tsc/narrowExceptionVariableInCatchClause.json index d363dec41197..7f0abbc26158 100644 --- a/crates/swc_ecma_parser/tests/tsc/narrowExceptionVariableInCatchClause.json +++ b/crates/swc_ecma_parser/tests/tsc/narrowExceptionVariableInCatchClause.json @@ -127,8 +127,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -154,8 +152,7 @@ "raw": "'foo'" } } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -164,7 +161,6 @@ "end": 70, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json b/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json index 0039cd212d6f..1085fa38ae70 100644 --- a/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json +++ b/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json @@ -987,8 +987,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1005,8 +1003,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1213,8 +1210,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1231,8 +1226,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nestedModules.json b/crates/swc_ecma_parser/tests/tsc/nestedModules.json index bfe4b69858f7..49ee428d82e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/nestedModules.json +++ b/crates/swc_ecma_parser/tests/tsc/nestedModules.json @@ -126,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -167,8 +164,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -185,8 +180,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -493,8 +487,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -511,8 +503,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -534,8 +525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -552,8 +541,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -918,8 +906,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -936,8 +922,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -959,8 +944,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -977,8 +960,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/neverInference.json b/crates/swc_ecma_parser/tests/tsc/neverInference.json index e0205fb16236..db5fcf0d2f66 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverInference.json +++ b/crates/swc_ecma_parser/tests/tsc/neverInference.json @@ -575,8 +575,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -631,8 +629,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -654,8 +651,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -710,8 +705,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -803,8 +797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -831,8 +823,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -854,8 +845,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -910,8 +899,7 @@ ] } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/neverIntersectionNotCallable.json b/crates/swc_ecma_parser/tests/tsc/neverIntersectionNotCallable.json index 08dfa024dab1..208ad3980508 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverIntersectionNotCallable.json +++ b/crates/swc_ecma_parser/tests/tsc/neverIntersectionNotCallable.json @@ -130,8 +130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -157,8 +155,7 @@ "raw": "\"\"" } } - }, - "typeParams": null + } } ] }, @@ -190,8 +187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -208,8 +203,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json b/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json index afd43f25fc85..3e64ee245e91 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json +++ b/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json @@ -3681,8 +3681,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3718,8 +3716,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -5000,8 +4997,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5018,8 +5013,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5041,8 +5035,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5069,8 +5061,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5092,8 +5083,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5118,8 +5107,7 @@ "kind": "string" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5141,8 +5129,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5159,8 +5145,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5182,8 +5167,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5200,8 +5183,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5223,8 +5205,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5241,8 +5221,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5264,8 +5243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5282,8 +5259,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5305,8 +5281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5323,8 +5297,7 @@ }, "kind": "unknown" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5346,8 +5319,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5364,8 +5335,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -5374,7 +5344,6 @@ "end": 3456, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5452,7 +5421,6 @@ "end": 3472, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5492,7 +5460,6 @@ "end": 3487, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5532,7 +5499,6 @@ "end": 3504, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5572,7 +5538,6 @@ "end": 3551, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5667,7 +5632,6 @@ "end": 3578, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5745,7 +5709,6 @@ "end": 3602, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5785,7 +5748,6 @@ "end": 3641, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5853,7 +5815,6 @@ "end": 3662, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6133,8 +6094,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6197,8 +6156,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6215,8 +6172,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6238,8 +6194,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6256,8 +6210,7 @@ }, "kind": "unknown" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -6266,7 +6219,6 @@ "end": 3858, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6306,7 +6258,6 @@ "end": 3875, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6343,8 +6294,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -8109,7 +8059,6 @@ "end": 4965, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/neverTypeErrors1.json b/crates/swc_ecma_parser/tests/tsc/neverTypeErrors1.json index 96ed03df433d..5129d0684af2 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverTypeErrors1.json +++ b/crates/swc_ecma_parser/tests/tsc/neverTypeErrors1.json @@ -810,8 +810,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -837,8 +835,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } } ] } @@ -891,8 +888,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -918,8 +913,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -1100,8 +1094,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1136,8 +1128,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/neverTypeErrors2.json b/crates/swc_ecma_parser/tests/tsc/neverTypeErrors2.json index e7d0bb4061a7..a7c6733e6b13 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverTypeErrors2.json +++ b/crates/swc_ecma_parser/tests/tsc/neverTypeErrors2.json @@ -810,8 +810,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -837,8 +835,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } } ] } @@ -891,8 +888,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -918,8 +913,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -1100,8 +1094,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1136,8 +1128,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/neverUnionIntersection.json b/crates/swc_ecma_parser/tests/tsc/neverUnionIntersection.json index 16536dfa5388..ce09ccb88c46 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverUnionIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/neverUnionIntersection.json @@ -559,8 +559,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -577,8 +575,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -649,8 +646,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -667,8 +662,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/newWithSpread.json b/crates/swc_ecma_parser/tests/tsc/newWithSpread.json index bc97cfcab90f..80d6c68ae5e0 100644 --- a/crates/swc_ecma_parser/tests/tsc/newWithSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/newWithSpread.json @@ -312,8 +312,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -446,8 +444,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -688,8 +685,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -716,8 +711,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } @@ -770,8 +764,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -798,8 +790,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/newWithSpreadES5.json b/crates/swc_ecma_parser/tests/tsc/newWithSpreadES5.json index 8eb3375c7fb7..70deb9952d50 100644 --- a/crates/swc_ecma_parser/tests/tsc/newWithSpreadES5.json +++ b/crates/swc_ecma_parser/tests/tsc/newWithSpreadES5.json @@ -312,8 +312,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -446,8 +444,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -688,8 +685,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -716,8 +711,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } @@ -770,8 +764,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -798,8 +790,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/newWithSpreadES6.json b/crates/swc_ecma_parser/tests/tsc/newWithSpreadES6.json index 5e9508a8708f..1f6f045f1595 100644 --- a/crates/swc_ecma_parser/tests/tsc/newWithSpreadES6.json +++ b/crates/swc_ecma_parser/tests/tsc/newWithSpreadES6.json @@ -312,8 +312,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -446,8 +444,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -688,8 +685,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -716,8 +711,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } @@ -770,8 +764,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -798,8 +790,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/noInfer.json b/crates/swc_ecma_parser/tests/tsc/noInfer.json index 90b32679a4b8..f8691029cab4 100644 --- a/crates/swc_ecma_parser/tests/tsc/noInfer.json +++ b/crates/swc_ecma_parser/tests/tsc/noInfer.json @@ -724,8 +724,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -742,8 +740,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1258,8 +1255,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1276,8 +1271,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1299,8 +1293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1317,8 +1309,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1543,8 +1534,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1561,8 +1550,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1584,8 +1572,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1602,8 +1588,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2373,8 +2358,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2429,8 +2412,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2643,8 +2625,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2671,8 +2651,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -4613,8 +4592,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4631,8 +4608,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4936,8 +4912,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4964,8 +4938,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5279,8 +5252,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5297,8 +5268,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/noPropertyAccessFromIndexSignature1.json b/crates/swc_ecma_parser/tests/tsc/noPropertyAccessFromIndexSignature1.json index 8837f75a3add..260f6a4794d7 100644 --- a/crates/swc_ecma_parser/tests/tsc/noPropertyAccessFromIndexSignature1.json +++ b/crates/swc_ecma_parser/tests/tsc/noPropertyAccessFromIndexSignature1.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -213,8 +210,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -231,8 +226,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json b/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json index bbc1138cd884..2d707e68271b 100644 --- a/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json @@ -4429,8 +4429,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4447,8 +4445,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4470,8 +4467,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4488,8 +4483,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -5281,8 +5275,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5299,8 +5291,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5789,8 +5780,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5807,8 +5796,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5830,8 +5818,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5848,8 +5834,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5921,8 +5906,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5939,8 +5922,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5962,8 +5944,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5980,8 +5960,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccessDestructuring.json b/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccessDestructuring.json index 3c78b70577fc..c471a3dd7ebe 100644 --- a/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccessDestructuring.json +++ b/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccessDestructuring.json @@ -923,8 +923,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -941,8 +939,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -964,8 +961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -982,8 +977,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json index a01d569941ff..c3df94a0b8a3 100644 --- a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json @@ -109,8 +109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -137,8 +135,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -160,8 +157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -188,8 +183,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -261,7 +255,6 @@ "end": 107, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -301,7 +294,6 @@ "end": 120, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -351,7 +343,6 @@ "end": 178, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -685,7 +676,6 @@ "end": 521, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -725,7 +715,6 @@ "end": 575, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter2.json b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter2.json index e472e38795d8..33f05b64fea2 100644 --- a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter2.json +++ b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter2.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -114,8 +112,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -248,8 +245,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +271,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -428,8 +422,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -456,8 +448,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -542,8 +533,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -570,8 +559,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -732,8 +720,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -760,8 +746,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nonInstantiatedModule.json b/crates/swc_ecma_parser/tests/tsc/nonInstantiatedModule.json index 36a9486bc7f2..8850776dcce2 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonInstantiatedModule.json +++ b/crates/swc_ecma_parser/tests/tsc/nonInstantiatedModule.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -129,8 +126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -779,8 +773,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -797,8 +789,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -820,8 +811,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -838,8 +827,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -909,8 +897,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -927,8 +913,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -950,8 +935,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -968,8 +951,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1100,7 +1082,6 @@ "end": 509, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1149,8 +1130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1167,8 +1146,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1190,8 +1168,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1208,8 +1184,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1413,8 +1388,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1431,8 +1404,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1454,8 +1426,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1472,8 +1442,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndEmptyObject.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndEmptyObject.json index b9255e57bd97..ae882c0f86a2 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndEmptyObject.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndEmptyObject.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -141,8 +138,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -188,8 +183,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json index bf0edbc2d615..2ac878d1e06d 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json @@ -603,8 +603,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -658,8 +656,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -809,8 +806,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -864,8 +859,7 @@ } ] } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAsProperty.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAsProperty.json index 7e7076e98f51..32ff9010541d 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAsProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAsProperty.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "object" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json index f53d57f657d7..e3419c00f2c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json @@ -2563,8 +2563,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2581,8 +2579,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json index 1205abc5f11f..e9dbfc32fabd 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json @@ -1644,8 +1644,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1662,8 +1660,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveUnionIntersection.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveUnionIntersection.json index 2e48c0335c26..897ac18551c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveUnionIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveUnionIntersection.json @@ -491,8 +491,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -509,8 +507,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json index aaf75800e4d6..3b3d14013173 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json @@ -185,8 +185,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -203,8 +201,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1311,8 +1308,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1329,8 +1324,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json b/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json index 42329a0e5c30..578f543a3a8f 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json +++ b/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json @@ -1739,8 +1739,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1757,8 +1755,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator1.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator1.json index 95b6efc99592..87b5852a5a7f 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator1.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator1.json @@ -978,8 +978,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -996,8 +994,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator12.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator12.json index 5932d46d599b..97886f251239 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator12.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator12.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -93,8 +91,7 @@ "kind": "any" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator8.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator8.json index e7e41dc8f443..27d6ceacb08c 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator8.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperator8.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -104,8 +102,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -114,7 +111,6 @@ "end": 84, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -236,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -273,8 +267,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -283,7 +276,6 @@ "end": 153, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInAsyncGenerator.json b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInAsyncGenerator.json index 5681f80afff2..656dda76032f 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInAsyncGenerator.json +++ b/crates/swc_ecma_parser/tests/tsc/nullishCoalescingOperatorInAsyncGenerator.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/numericIndexerConstrainsPropertyDeclarations.json b/crates/swc_ecma_parser/tests/tsc/numericIndexerConstrainsPropertyDeclarations.json index 8d47440be005..fb354c850e74 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericIndexerConstrainsPropertyDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/numericIndexerConstrainsPropertyDeclarations.json @@ -74,8 +74,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -92,8 +90,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1191,8 +1188,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1209,8 +1204,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1232,8 +1226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1250,8 +1242,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1273,8 +1264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1309,8 +1298,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1332,8 +1320,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1350,8 +1336,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1373,8 +1358,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1391,8 +1374,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1414,8 +1396,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1432,8 +1412,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1455,8 +1434,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1473,8 +1450,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsCallSignatureDeclaration", @@ -1549,7 +1525,6 @@ "end": 961, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1602,8 +1577,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1620,8 +1593,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1643,8 +1615,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1661,8 +1631,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1684,8 +1653,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1712,8 +1679,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1835,8 +1801,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1853,8 +1817,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1876,8 +1839,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1894,8 +1855,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1917,8 +1877,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1953,8 +1911,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1976,8 +1933,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1994,8 +1949,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2017,8 +1971,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2035,8 +1987,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2058,8 +2009,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2076,8 +2025,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2099,8 +2047,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2117,8 +2063,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsCallSignatureDeclaration", @@ -2193,7 +2138,6 @@ "end": 1306, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2246,8 +2190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2264,8 +2206,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2287,8 +2228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2305,8 +2244,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2328,8 +2266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2356,8 +2292,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/numericIndexerConstrainsPropertyDeclarations2.json b/crates/swc_ecma_parser/tests/tsc/numericIndexerConstrainsPropertyDeclarations2.json index edec5d6051e8..71bb5806dcb0 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericIndexerConstrainsPropertyDeclarations2.json +++ b/crates/swc_ecma_parser/tests/tsc/numericIndexerConstrainsPropertyDeclarations2.json @@ -693,8 +693,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -721,8 +719,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -744,8 +741,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -772,8 +767,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -795,8 +789,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -823,8 +815,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -846,8 +837,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -864,8 +853,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -887,8 +875,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -905,8 +891,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1038,8 +1023,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1066,8 +1049,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1089,8 +1071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1117,8 +1097,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1140,8 +1119,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1168,8 +1145,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1191,8 +1167,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1209,8 +1183,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1232,8 +1205,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1250,8 +1221,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/numericIndexingResults.json b/crates/swc_ecma_parser/tests/tsc/numericIndexingResults.json index 280788c12c03..d2869e90fabd 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericIndexingResults.json +++ b/crates/swc_ecma_parser/tests/tsc/numericIndexingResults.json @@ -736,8 +736,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -754,8 +752,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -777,8 +774,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -795,8 +790,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1385,8 +1379,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1403,8 +1395,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1426,8 +1417,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1444,8 +1433,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2550,8 +2538,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2568,8 +2554,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2591,8 +2576,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2609,8 +2592,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes1.json b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes1.json index 16b7230f00f2..1b98632bc757 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes1.json @@ -5345,8 +5345,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5372,8 +5370,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5395,8 +5392,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5413,8 +5408,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -5446,8 +5440,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5473,8 +5465,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5496,8 +5487,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5514,8 +5503,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -5547,8 +5535,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5574,8 +5560,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5597,8 +5582,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5615,8 +5598,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes2.json index 70703bccc542..f46639edb597 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/numericLiteralTypes2.json @@ -5345,8 +5345,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5372,8 +5370,7 @@ "raw": "0" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5395,8 +5392,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5413,8 +5408,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -5446,8 +5440,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5473,8 +5465,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5496,8 +5487,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5514,8 +5503,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -5547,8 +5535,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5574,8 +5560,7 @@ "raw": "2" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5597,8 +5582,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5615,8 +5598,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/numericStringLiteralTypes.json b/crates/swc_ecma_parser/tests/tsc/numericStringLiteralTypes.json index 13039e8f258c..d39b97fa8b3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/numericStringLiteralTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/numericStringLiteralTypes.json @@ -1705,8 +1705,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1733,8 +1731,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json index 9286b1ae921f..8c5cf2c802d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -950,8 +944,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -978,8 +970,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.json index 659e40f3386b..6655d9855e54 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.json @@ -1267,8 +1267,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1285,8 +1283,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1308,8 +1305,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1326,8 +1321,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1359,8 +1353,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1377,8 +1369,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1400,8 +1391,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1418,8 +1407,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1636,8 +1624,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1654,8 +1640,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1677,8 +1662,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1695,8 +1678,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1718,8 +1700,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1736,8 +1716,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -2964,8 +2943,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2991,8 +2968,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3014,8 +2990,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3041,8 +3015,7 @@ "raw": "\"abc\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3064,8 +3037,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3090,8 +3061,7 @@ "value": true } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignment.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignment.json index e2e3420abcc6..c85e9980086d 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignment.json @@ -183,8 +183,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -201,8 +199,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -224,8 +221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -242,8 +237,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -349,8 +343,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -367,8 +359,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -881,8 +872,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -899,8 +888,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -922,8 +910,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -940,8 +926,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1129,8 +1114,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1147,8 +1130,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1266,8 +1248,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1284,8 +1264,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1307,8 +1286,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1325,8 +1302,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentES6.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentES6.json index 56f96a1e6e91..6d6ccb557351 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentES6.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentES6.json @@ -183,8 +183,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -201,8 +199,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -224,8 +221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -242,8 +237,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -349,8 +343,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -367,8 +359,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -881,8 +872,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -899,8 +888,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -922,8 +910,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -940,8 +926,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1129,8 +1114,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1147,8 +1130,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1266,8 +1248,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1284,8 +1264,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1307,8 +1286,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1325,8 +1302,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentError.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentError.json index a14aa0e75879..7b5cabe6499e 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentError.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentError.json @@ -183,8 +183,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -201,8 +199,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -224,8 +221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -242,8 +237,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -344,10 +338,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -369,10 +360,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -562,8 +550,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -580,8 +566,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -603,8 +588,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -621,8 +604,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -694,8 +676,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -712,8 +692,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -735,8 +714,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -753,8 +730,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.json index a3ba6f8480a0..fec1796d2f6d 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesAssignmentErrorFromMissingIdentifier.json @@ -183,8 +183,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -201,8 +199,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -224,8 +221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -242,8 +237,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -462,8 +456,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -480,8 +472,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -503,8 +494,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -521,8 +510,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -707,8 +695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -725,8 +711,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -748,8 +733,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -766,8 +749,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -834,10 +816,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -859,10 +838,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -934,8 +910,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -952,8 +926,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -975,8 +948,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -993,8 +964,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument.json index 27077d999dd2..78f821ab7b44 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument.json @@ -250,8 +250,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -268,8 +266,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -291,8 +288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -309,8 +304,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument2.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument2.json index 301e57772310..559aa2eb89f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralShorthandPropertiesFunctionArgument2.json @@ -250,8 +250,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -268,8 +266,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -291,8 +288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -309,8 +304,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectRest.json b/crates/swc_ecma_parser/tests/tsc/objectRest.json index 80a4a9c4e343..85f2102a6122 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRest.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRest.json @@ -936,8 +936,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -954,8 +952,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -977,8 +974,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1014,8 +1009,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1032,8 +1025,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1055,8 +1047,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1092,8 +1082,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1110,8 +1098,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1133,8 +1120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1170,8 +1155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1188,23 +1171,19 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1226,8 +1205,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1244,8 +1221,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1267,8 +1243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1285,8 +1259,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1586,8 +1559,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1623,10 +1594,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -1648,15 +1616,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1678,8 +1642,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1696,8 +1658,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2843,7 +2804,6 @@ "end": 1007, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2896,8 +2856,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2914,8 +2872,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2937,8 +2894,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2955,8 +2910,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestAssignment.json b/crates/swc_ecma_parser/tests/tsc/objectRestAssignment.json index 4bffa6b1f588..802deab6a575 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestAssignment.json @@ -116,10 +116,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -289,8 +286,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -326,10 +321,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -351,15 +343,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -381,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -399,8 +385,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -638,8 +623,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -682,8 +665,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -700,8 +681,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -723,8 +703,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -741,14 +719,12 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -770,8 +746,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -807,8 +781,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -825,8 +797,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -848,8 +819,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -866,8 +835,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -889,8 +857,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -907,13 +873,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -935,8 +899,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -953,8 +915,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -976,8 +937,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -994,8 +953,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestForOf.json b/crates/swc_ecma_parser/tests/tsc/objectRestForOf.json index fb63044d61f9..952906551295 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestForOf.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestForOf.json @@ -74,8 +74,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -92,8 +90,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -115,8 +112,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -133,8 +128,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -408,8 +402,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -426,8 +418,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json b/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json index 5a6e9eb6e95d..ffb896e3423c 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json @@ -292,8 +292,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -310,8 +308,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -526,8 +523,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -544,8 +539,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -567,8 +561,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -585,8 +577,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -871,10 +862,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -896,10 +884,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] }, @@ -970,8 +955,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -988,8 +971,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json b/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json index 0d830ce38db9..2d6e60ebcce8 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestParameter.json @@ -118,8 +118,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -136,8 +134,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -159,8 +156,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -177,8 +172,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -312,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -349,10 +341,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -374,15 +363,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -404,8 +389,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -422,8 +405,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1074,8 +1056,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1092,8 +1072,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1115,8 +1094,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1133,8 +1110,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1302,8 +1278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1320,8 +1294,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1343,8 +1316,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1361,8 +1332,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json b/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json index 0fade53733b9..68ba9ddc2c7c 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestParameterES5.json @@ -118,8 +118,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -136,8 +134,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -159,8 +156,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -177,8 +172,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -312,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -349,10 +341,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -374,15 +363,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -404,8 +389,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -422,8 +405,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1074,8 +1056,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1092,8 +1072,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1115,8 +1094,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1133,8 +1110,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1302,8 +1278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1320,8 +1294,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1343,8 +1316,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1361,8 +1332,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestReadonly.json b/crates/swc_ecma_parser/tests/tsc/objectRestReadonly.json index 033c439e90e3..cb9edc8a9143 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestReadonly.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestReadonly.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -94,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -112,8 +107,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -135,8 +129,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -153,8 +145,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpread.json b/crates/swc_ecma_parser/tests/tsc/objectSpread.json index 9f449f24c029..f51cce5614ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpread.json @@ -339,8 +339,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -357,8 +355,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -380,8 +377,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -398,8 +393,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -421,8 +415,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -439,8 +431,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -561,8 +552,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -579,8 +568,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -602,8 +590,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -620,8 +606,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -643,8 +628,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -661,8 +644,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -783,8 +765,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -801,8 +781,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -824,8 +803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -842,8 +819,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -965,8 +941,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -983,8 +957,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1006,8 +979,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1024,8 +995,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1047,8 +1017,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1065,8 +1033,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1274,8 +1241,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1292,8 +1257,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1315,8 +1279,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1333,8 +1295,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1356,8 +1317,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1374,8 +1333,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -1492,8 +1450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1510,8 +1466,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1533,8 +1488,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1551,8 +1504,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1574,8 +1526,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1592,8 +1542,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -1733,8 +1682,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1751,8 +1698,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1774,8 +1720,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1792,8 +1736,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1815,8 +1758,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1833,8 +1774,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2051,8 +1991,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2088,8 +2026,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2106,8 +2042,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2129,8 +2064,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2147,13 +2080,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -2364,8 +2295,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2382,8 +2311,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2405,8 +2333,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2423,8 +2349,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2669,8 +2594,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2687,8 +2610,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2710,8 +2632,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2728,8 +2648,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2751,8 +2670,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2769,8 +2686,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2841,8 +2757,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2869,8 +2783,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3553,8 +3466,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3571,8 +3482,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3594,8 +3504,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3612,8 +3520,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4048,8 +3955,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4066,8 +3971,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4089,8 +3993,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4107,8 +4009,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4543,8 +4444,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4561,8 +4460,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4584,8 +4482,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4602,8 +4498,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4968,8 +4863,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4986,8 +4879,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5086,8 +4978,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5104,8 +4994,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -5114,7 +5003,6 @@ "end": 2311, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5377,8 +5265,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5395,8 +5281,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5418,8 +5303,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5436,8 +5319,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5559,8 +5441,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5577,8 +5457,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5600,8 +5479,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5618,8 +5495,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5741,8 +5617,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5759,8 +5633,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -5819,8 +5692,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5837,8 +5708,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5897,8 +5767,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5915,8 +5783,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5975,8 +5842,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5993,8 +5858,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6077,8 +5941,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6123,8 +5985,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -6259,8 +6120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6296,8 +6155,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -6450,8 +6308,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6487,8 +6343,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -6605,8 +6460,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6623,8 +6476,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6646,8 +6498,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6664,8 +6514,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6687,8 +6536,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6705,8 +6552,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6859,8 +6705,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6877,8 +6721,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6900,8 +6743,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6918,8 +6759,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6941,8 +6781,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6959,8 +6797,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7162,8 +6999,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7180,8 +7015,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7203,8 +7037,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7221,8 +7053,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -7667,8 +7498,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7685,8 +7514,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7708,8 +7536,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7726,8 +7552,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7749,8 +7574,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7767,8 +7590,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7790,8 +7612,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7808,8 +7628,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7831,8 +7650,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7849,8 +7666,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -8059,8 +7875,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8077,8 +7891,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8100,8 +7913,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8118,8 +7929,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8141,8 +7951,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8159,8 +7967,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -8347,8 +8154,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8365,8 +8170,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8388,8 +8192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8406,8 +8208,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -8571,8 +8372,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8589,8 +8388,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8612,8 +8410,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8630,8 +8426,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8653,8 +8448,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8671,8 +8464,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8694,8 +8486,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8712,8 +8502,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -9121,8 +8910,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9139,8 +8926,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -9201,8 +8987,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9219,8 +9003,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpreadIndexSignature.json b/crates/swc_ecma_parser/tests/tsc/objectSpreadIndexSignature.json index cadb99bb2aa7..6b9fe33a63f1 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpreadIndexSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpreadIndexSignature.json @@ -123,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -141,8 +139,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -270,8 +267,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -288,8 +283,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedNullCheckPerf.json b/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedNullCheckPerf.json index d201e8e7b0b8..e71ad6fd42c5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedNullCheckPerf.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpreadRepeatedNullCheckPerf.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -136,8 +130,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -154,8 +146,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -177,8 +168,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -195,8 +184,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -218,8 +206,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +222,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -259,8 +244,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -277,8 +260,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -300,8 +282,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -318,8 +298,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -341,8 +320,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -359,8 +336,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -382,8 +358,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -400,8 +374,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -423,8 +396,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -441,8 +412,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -464,8 +434,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -482,8 +450,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -505,8 +472,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -523,8 +488,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -546,8 +510,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -564,8 +526,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -587,8 +548,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -605,8 +564,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -628,8 +586,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -646,8 +602,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -669,8 +624,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -687,8 +640,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -710,8 +662,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -728,8 +678,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -751,8 +700,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -769,8 +716,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -792,8 +738,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -810,8 +754,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -833,8 +776,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -851,8 +792,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -874,8 +814,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -892,8 +830,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -915,8 +852,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -933,8 +868,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -956,8 +890,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -974,8 +906,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -997,8 +928,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1015,8 +944,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1038,8 +966,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1056,8 +982,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1079,8 +1004,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1097,8 +1020,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpreadSetonlyAccessor.json b/crates/swc_ecma_parser/tests/tsc/objectSpreadSetonlyAccessor.json index 7b9b75c4b840..ca8a47b4383f 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpreadSetonlyAccessor.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpreadSetonlyAccessor.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -108,8 +105,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +121,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } } ] } @@ -304,8 +298,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -322,8 +314,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json b/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json index 4957c2254ed4..7e447e09f23f 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpreadStrictNull.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -150,8 +147,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -168,8 +163,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -228,8 +222,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -246,8 +238,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -306,8 +297,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -324,8 +313,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -384,8 +372,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -421,8 +407,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -481,8 +466,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -518,8 +501,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -602,8 +584,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -639,8 +619,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -775,8 +754,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -812,8 +789,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -966,8 +942,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1003,8 +977,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1121,8 +1094,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1158,8 +1129,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1294,8 +1264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1331,8 +1299,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1485,8 +1452,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1531,8 +1496,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1649,8 +1613,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1695,8 +1657,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1824,8 +1785,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1842,8 +1801,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1865,8 +1823,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1883,8 +1839,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2134,8 +2089,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2152,8 +2105,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2175,8 +2127,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2193,8 +2143,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2247,8 +2196,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2284,8 +2231,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2307,8 +2253,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2344,8 +2288,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfExtendedObject.json b/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfExtendedObject.json index 92f258e3aebf..b0cd0aad1c68 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfExtendedObject.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfExtendedObject.json @@ -207,8 +207,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -235,8 +233,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -893,7 +890,6 @@ "end": 403, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -946,8 +942,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -974,8 +968,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -1869,7 +1862,6 @@ "end": 779, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1922,8 +1914,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1950,8 +1940,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObject.json b/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObject.json index 7407a1b00581..1bfc2d5785fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObject.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObject.json @@ -259,7 +259,6 @@ "end": 199, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -651,7 +650,6 @@ "end": 336, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObjectAssignmentCompat.json b/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObjectAssignmentCompat.json index 3f12285d7cc2..4f84f6a0357d 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObjectAssignmentCompat.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObjectAssignmentCompat.json @@ -41,7 +41,6 @@ "end": 36, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObjectAssignmentCompat2.json b/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObjectAssignmentCompat2.json index 47d6bd3ae137..486c31f0fc71 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObjectAssignmentCompat2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeHidingMembersOfObjectAssignmentCompat2.json @@ -41,7 +41,6 @@ "end": 38, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeLiteralSyntax.json b/crates/swc_ecma_parser/tests/tsc/objectTypeLiteralSyntax.json index cd1af4ab40b7..a7a8be54be8f 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeLiteralSyntax.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeLiteralSyntax.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -108,8 +105,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +121,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -240,8 +231,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,8 +247,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypePropertyAccess.json b/crates/swc_ecma_parser/tests/tsc/objectTypePropertyAccess.json index 099128cce39d..c44e6e475411 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypePropertyAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypePropertyAccess.json @@ -461,8 +461,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -479,8 +477,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.json index 67fb34cbbcf6..a75027cc04a7 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfExtendedFunction.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -206,7 +203,6 @@ "end": 229, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -301,7 +297,6 @@ "end": 284, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1056,7 +1051,6 @@ "end": 548, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1151,7 +1145,6 @@ "end": 603, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfFunction.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfFunction.json index fa389d169320..9c64837b68f0 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithCallSignatureHidingMembersOfFunction.json @@ -68,7 +68,6 @@ "end": 162, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -163,7 +162,6 @@ "end": 217, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -790,7 +788,6 @@ "end": 424, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -885,7 +882,6 @@ "end": 479, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.json index 1d471337388f..ab031c03809a 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfExtendedFunction.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -206,7 +203,6 @@ "end": 134, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -301,7 +297,6 @@ "end": 189, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1056,7 +1051,6 @@ "end": 458, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1151,7 +1145,6 @@ "end": 513, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfFunction.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfFunction.json index 078161e5809c..5b6fd6fc19e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithConstructSignatureHidingMembersOfFunction.json @@ -68,7 +68,6 @@ "end": 67, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -163,7 +162,6 @@ "end": 122, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -790,7 +788,6 @@ "end": 334, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -885,7 +882,6 @@ "end": 389, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithNumericProperty.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithNumericProperty.json index 8f937600dbe9..26279586b2d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithNumericProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithNumericProperty.json @@ -502,8 +502,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -520,8 +518,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -543,8 +540,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -561,8 +556,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -959,8 +953,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -977,8 +969,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1000,8 +991,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1018,8 +1007,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json index fd66a3142082..29d652d4a4f8 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json @@ -469,8 +469,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -487,8 +485,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -510,8 +507,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -528,8 +523,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringIndexerHidingObjectIndexer.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringIndexerHidingObjectIndexer.json index df6810b56ff6..d2a983e7e480 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringIndexerHidingObjectIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringIndexerHidingObjectIndexer.json @@ -531,8 +531,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -549,8 +547,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -815,8 +812,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -833,8 +828,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringNamedPropertyOfIllegalCharacters.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringNamedPropertyOfIllegalCharacters.json index a0190aeb8184..19b369ddd34a 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringNamedPropertyOfIllegalCharacters.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringNamedPropertyOfIllegalCharacters.json @@ -637,8 +637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -655,8 +653,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -678,8 +675,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -696,8 +691,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -719,8 +713,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -737,8 +729,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1135,8 +1126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1153,8 +1142,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1176,8 +1164,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1194,8 +1180,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1217,8 +1202,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1235,8 +1218,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json index c37ca13daa22..851c7bc95e5b 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json @@ -312,8 +312,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -330,8 +328,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -397,8 +394,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -415,8 +410,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json index d755b8e50ef8..cc9040fb6c76 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json @@ -312,8 +312,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -340,8 +338,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -407,8 +404,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -435,8 +430,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json index e494b19d88e3..154326876594 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json @@ -522,7 +522,6 @@ "end": 250, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -653,7 +652,6 @@ "end": 289, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -785,7 +783,6 @@ "end": 324, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json index a4a317e70f7d..10507833eeb3 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json @@ -522,7 +522,6 @@ "end": 251, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -653,7 +652,6 @@ "end": 290, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -785,7 +783,6 @@ "end": 323, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json index 668dac5512b2..c4f7a3196429 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json @@ -604,7 +604,6 @@ "end": 267, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -735,7 +734,6 @@ "end": 306, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -867,7 +865,6 @@ "end": 352, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json index 547ef2a0b0e5..c84cfa47c773 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json @@ -1159,7 +1159,6 @@ "end": 428, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1227,7 +1226,6 @@ "end": 456, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1358,7 +1356,6 @@ "end": 509, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1426,7 +1423,6 @@ "end": 537, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1494,7 +1490,6 @@ "end": 555, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1626,7 +1621,6 @@ "end": 594, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1694,7 +1688,6 @@ "end": 621, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json index 034957ff9c30..94c765a550ad 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json @@ -658,7 +658,6 @@ "end": 229, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -777,7 +776,6 @@ "end": 268, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -941,7 +939,6 @@ "end": 296, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json index b6f66f506698..d86bbbe440e6 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json @@ -888,7 +888,6 @@ "end": 265, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1044,7 +1043,6 @@ "end": 313, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1268,7 +1266,6 @@ "end": 350, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json index 939325bb6147..b22339f00ae4 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json @@ -718,7 +718,6 @@ "end": 605, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -827,7 +826,6 @@ "end": 665, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -999,7 +997,6 @@ "end": 720, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json index 054eb8cd7ac2..02bd56967b0e 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json @@ -1310,7 +1310,6 @@ "end": 770, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1456,7 +1455,6 @@ "end": 849, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1706,7 +1704,6 @@ "end": 923, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json index 2b7519b6c294..553f060708b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json @@ -198,8 +198,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +214,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -302,8 +299,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -330,8 +325,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -549,8 +543,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -577,8 +569,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1905,7 +1896,6 @@ "end": 958, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2051,7 +2041,6 @@ "end": 1049, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2328,7 +2317,6 @@ "end": 1113, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json index 973d8854d881..5fcf5bf5edb1 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json @@ -628,7 +628,6 @@ "end": 539, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -747,7 +746,6 @@ "end": 583, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -911,7 +909,6 @@ "end": 611, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json index 9b2105291236..15b4f48be62e 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json @@ -700,7 +700,6 @@ "end": 591, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -819,7 +818,6 @@ "end": 648, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1001,7 +999,6 @@ "end": 689, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json index fff614703fd7..94408e2a52ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json @@ -796,7 +796,6 @@ "end": 247, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -915,7 +914,6 @@ "end": 295, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1148,7 +1146,6 @@ "end": 335, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json index abcb6bf3d17f..45385246e7d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json @@ -658,7 +658,6 @@ "end": 229, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -777,7 +776,6 @@ "end": 268, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -941,7 +939,6 @@ "end": 296, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json index 04678c7e7336..5988edff51c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json @@ -796,7 +796,6 @@ "end": 548, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -952,7 +951,6 @@ "end": 594, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1153,7 +1151,6 @@ "end": 629, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json index 89bf826c5ad0..c3833999e001 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json @@ -888,7 +888,6 @@ "end": 560, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1044,7 +1043,6 @@ "end": 609, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1268,7 +1266,6 @@ "end": 647, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json index 39aa66dcd16a..cc2f0773846c 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json @@ -888,7 +888,6 @@ "end": 559, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1044,7 +1043,6 @@ "end": 607, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1268,7 +1266,6 @@ "end": 645, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json index 2d9eaf4179ea..79398065339b 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json @@ -198,8 +198,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +214,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -302,8 +299,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -330,8 +325,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -549,8 +543,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -577,8 +569,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json index f4620121acc5..bf9dd9909d52 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json @@ -312,8 +312,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -330,8 +328,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -397,8 +394,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -415,8 +410,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json index 7aa39e0eeec7..4bf5112c298b 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json @@ -312,8 +312,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -330,8 +328,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -467,8 +464,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -485,8 +480,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates3.json index a414f4209e37..7f2ca186f880 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates3.json @@ -84,10 +84,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json index b227ccb34fa1..216bbc61b8f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json @@ -312,8 +312,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -330,8 +328,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -397,8 +394,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -415,8 +410,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/operatorsAndIntersectionTypes.json b/crates/swc_ecma_parser/tests/tsc/operatorsAndIntersectionTypes.json index 976210907fc0..efe54329c38a 100644 --- a/crates/swc_ecma_parser/tests/tsc/operatorsAndIntersectionTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/operatorsAndIntersectionTypes.json @@ -70,10 +70,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -144,10 +141,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/optionalBindingParameters2.json b/crates/swc_ecma_parser/tests/tsc/optionalBindingParameters2.json index 49e3963cdbc6..2dbcb1ce22c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalBindingParameters2.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalBindingParameters2.json @@ -133,8 +133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -151,8 +149,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -174,8 +171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -192,8 +187,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -215,8 +209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -233,8 +225,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/optionalBindingParametersInOverloads2.json b/crates/swc_ecma_parser/tests/tsc/optionalBindingParametersInOverloads2.json index c287c438b849..1b5e171c14b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalBindingParametersInOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalBindingParametersInOverloads2.json @@ -133,8 +133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -151,8 +149,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -174,8 +171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -192,8 +187,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -215,8 +209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -233,8 +225,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.2.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.2.json index c9add1ea43b3..40e5f43bfe59 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.2.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.2.json @@ -98,8 +98,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -116,8 +114,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.json index 8a5441ddd964..1044e024f9c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterBindingPattern.json @@ -98,8 +98,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -116,8 +114,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.2.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.2.json index 8e3a61e61248..54c421624984 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.2.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.2.json @@ -98,8 +98,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -116,8 +114,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.json index 145eb3e83f36..8ceeb09660dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInParameterInitializer.json @@ -98,8 +98,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -116,8 +114,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json index 8df701df43c5..fe81a38e95b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -119,8 +117,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -429,8 +426,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -447,8 +442,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -539,8 +533,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -575,8 +567,7 @@ } } } - }, - "typeParams": null + } } ] }, @@ -1043,8 +1034,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1080,8 +1069,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/optionalMethods.json b/crates/swc_ecma_parser/tests/tsc/optionalMethods.json index d63be2f8c944..77ad5e72fcb7 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalMethods.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -123,7 +117,6 @@ "end": 114, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -163,7 +156,6 @@ "end": 132, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/optionalProperties01.json b/crates/swc_ecma_parser/tests/tsc/optionalProperties01.json index 76d11fa1022c..309c1f7fe0d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalProperties01.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalProperties01.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -136,8 +130,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -154,8 +146,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/optionalProperties02.json b/crates/swc_ecma_parser/tests/tsc/optionalProperties02.json index ae08ce8aecd8..6b5f21c9358a 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalProperties02.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalProperties02.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/optionalPropertyAssignableToStringIndexSignature.json b/crates/swc_ecma_parser/tests/tsc/optionalPropertyAssignableToStringIndexSignature.json index 41ebce8433a2..c513d4a1e234 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalPropertyAssignableToStringIndexSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalPropertyAssignableToStringIndexSignature.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -195,8 +190,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -556,8 +550,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -574,8 +566,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -685,8 +676,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -703,8 +692,7 @@ }, "kind": "undefined" } - }, - "typeParams": null + } } ] } @@ -919,8 +907,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -947,8 +933,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/override19.json b/crates/swc_ecma_parser/tests/tsc/override19.json index 39c78f7c2204..e289eeac0876 100644 --- a/crates/swc_ecma_parser/tests/tsc/override19.json +++ b/crates/swc_ecma_parser/tests/tsc/override19.json @@ -439,8 +439,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -495,8 +493,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/override20.json b/crates/swc_ecma_parser/tests/tsc/override20.json index f003bde73562..451f76345a51 100644 --- a/crates/swc_ecma_parser/tests/tsc/override20.json +++ b/crates/swc_ecma_parser/tests/tsc/override20.json @@ -237,7 +237,6 @@ "end": 154, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -308,7 +307,6 @@ "end": 188, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -348,7 +346,6 @@ "end": 204, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json b/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json index 4c0fbba6e29a..7a52966cf9b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json @@ -109,8 +109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -127,8 +125,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -522,8 +519,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -577,8 +572,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parametersWithNoAnnotationAreAny.json b/crates/swc_ecma_parser/tests/tsc/parametersWithNoAnnotationAreAny.json index e470da7f4f29..052fb425f38c 100644 --- a/crates/swc_ecma_parser/tests/tsc/parametersWithNoAnnotationAreAny.json +++ b/crates/swc_ecma_parser/tests/tsc/parametersWithNoAnnotationAreAny.json @@ -499,7 +499,6 @@ "end": 186, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -535,7 +534,6 @@ "end": 202, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -626,7 +624,6 @@ "end": 226, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parentheses.json b/crates/swc_ecma_parser/tests/tsc/parentheses.json index 153375b5315a..848b2cd85858 100644 --- a/crates/swc_ecma_parser/tests/tsc/parentheses.json +++ b/crates/swc_ecma_parser/tests/tsc/parentheses.json @@ -192,8 +192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -278,8 +276,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -351,8 +348,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -513,8 +508,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -586,8 +580,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -696,8 +688,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -782,16 +772,14 @@ } } } - }, - "typeParams": null + } } ] } } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json index 3b10637b9aad..42fe97abf5a3 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json @@ -3303,8 +3303,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3367,8 +3365,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3390,8 +3387,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3454,8 +3449,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json index c6e3823f4eed..3c5cbf8ccc46 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json @@ -4692,8 +4692,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4756,8 +4754,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4779,8 +4776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4843,8 +4838,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parser509677.json b/crates/swc_ecma_parser/tests/tsc/parser509677.json index fd6ff2d113c0..1ab18db26195 100644 --- a/crates/swc_ecma_parser/tests/tsc/parser509677.json +++ b/crates/swc_ecma_parser/tests/tsc/parser509677.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parser643728.json b/crates/swc_ecma_parser/tests/tsc/parser643728.json index 938fb2aa17c2..d3bf4b6961cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/parser643728.json +++ b/crates/swc_ecma_parser/tests/tsc/parser643728.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -79,10 +76,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parser645484.json b/crates/swc_ecma_parser/tests/tsc/parser645484.json index 8b3e4491d792..694a799f7ead 100644 --- a/crates/swc_ecma_parser/tests/tsc/parser645484.json +++ b/crates/swc_ecma_parser/tests/tsc/parser645484.json @@ -54,7 +54,6 @@ "end": 27, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserAstSpans1.json b/crates/swc_ecma_parser/tests/tsc/parserAstSpans1.json index 0b5b6f722674..c916efc97215 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserAstSpans1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserAstSpans1.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -82,7 +79,6 @@ "end": 123, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -135,8 +131,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -171,8 +165,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -194,8 +187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -212,8 +203,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -222,7 +212,6 @@ "end": 206, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -275,8 +264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -311,8 +298,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -334,8 +320,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -352,8 +336,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -362,7 +345,6 @@ "end": 264, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -415,8 +397,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -451,8 +431,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -474,8 +453,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -492,8 +469,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -502,7 +478,6 @@ "end": 322, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -555,8 +530,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -591,8 +564,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4630,8 +4602,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4648,8 +4618,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -4658,7 +4627,6 @@ "end": 2564, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4711,8 +4679,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4747,8 +4713,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4770,8 +4735,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4788,8 +4751,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -4798,7 +4760,6 @@ "end": 2647, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4851,8 +4812,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4887,8 +4846,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4910,8 +4868,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4928,8 +4884,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -4938,7 +4893,6 @@ "end": 2737, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4991,8 +4945,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5027,8 +4979,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5050,8 +5001,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5068,8 +5017,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -5078,7 +5026,6 @@ "end": 2811, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5131,8 +5078,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5167,8 +5112,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5241,8 +5185,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5259,8 +5201,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -5269,7 +5210,6 @@ "end": 2926, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5322,8 +5262,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5358,8 +5296,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5381,8 +5318,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5399,8 +5334,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -5409,7 +5343,6 @@ "end": 3000, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5462,8 +5395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5498,8 +5429,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration25.json b/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration25.json index 9a0e40d7df9b..53586bee0dba 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration25.json +++ b/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration25.json @@ -73,7 +73,6 @@ "end": 36, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -123,7 +122,6 @@ "end": 56, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserCommaInTypeMemberList1.json b/crates/swc_ecma_parser/tests/tsc/parserCommaInTypeMemberList1.json index b3803860961d..a6f8d84f2a18 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserCommaInTypeMemberList1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserCommaInTypeMemberList1.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -108,8 +105,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +121,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserCommaInTypeMemberList2.json b/crates/swc_ecma_parser/tests/tsc/parserCommaInTypeMemberList2.json index 39049efdbbf6..4e6b35778720 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserCommaInTypeMemberList2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserCommaInTypeMemberList2.json @@ -171,8 +171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +187,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] }, @@ -222,8 +219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -240,8 +235,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -263,8 +257,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -281,8 +273,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty1.json b/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty1.json index 3259aff8c041..2d1fbf745749 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty1.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty2.json b/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty2.json index 85583792247a..64d3a474bc4f 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty2.json @@ -41,7 +41,6 @@ "end": 65, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty8.json b/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty8.json index 3a63b95d1d7f..c9db368d6436 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty8.json +++ b/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty8.json @@ -54,7 +54,6 @@ "end": 59, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty9.json b/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty9.json index 3fcfbc0977a3..4b7c77fec0fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty9.json +++ b/crates/swc_ecma_parser/tests/tsc/parserES5SymbolProperty9.json @@ -85,8 +85,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -103,8 +101,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_IncompleteMemberVariable1.json b/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_IncompleteMemberVariable1.json index 7f9573850854..8c51c7be8733 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_IncompleteMemberVariable1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserErrorRecovery_IncompleteMemberVariable1.json @@ -41,7 +41,6 @@ "end": 55, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserExportAsFunctionIdentifier.json b/crates/swc_ecma_parser/tests/tsc/parserExportAsFunctionIdentifier.json index f9beb90bfd0b..e64055584f86 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserExportAsFunctionIdentifier.json +++ b/crates/swc_ecma_parser/tests/tsc/parserExportAsFunctionIdentifier.json @@ -41,7 +41,6 @@ "end": 41, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericsInInterfaceDeclaration1.json b/crates/swc_ecma_parser/tests/tsc/parserGenericsInInterfaceDeclaration1.json index 57543d759c18..1a6bb4350404 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericsInInterfaceDeclaration1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericsInInterfaceDeclaration1.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +140,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -152,7 +149,6 @@ "end": 44, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -234,7 +230,6 @@ "end": 60, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserInterfaceDeclaration9.json b/crates/swc_ecma_parser/tests/tsc/parserInterfaceDeclaration9.json index 354ce591680d..ad7eb746f3a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserInterfaceDeclaration9.json +++ b/crates/swc_ecma_parser/tests/tsc/parserInterfaceDeclaration9.json @@ -41,7 +41,6 @@ "end": 38, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -53,7 +52,6 @@ "optional": false }, "computed": false, - "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,7 +77,6 @@ "end": 66, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -91,7 +88,6 @@ "optional": false }, "computed": false, - "optional": false, "param": { "type": "Identifier", "span": { @@ -158,7 +154,6 @@ "end": 107, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -170,7 +165,6 @@ "optional": false }, "computed": false, - "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -196,7 +190,6 @@ "end": 135, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -208,7 +201,6 @@ "optional": false }, "computed": false, - "optional": false, "param": { "type": "Identifier", "span": { @@ -275,7 +267,6 @@ "end": 175, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -287,7 +278,6 @@ "optional": false }, "computed": false, - "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -313,7 +303,6 @@ "end": 202, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -325,7 +314,6 @@ "optional": false }, "computed": false, - "optional": false, "param": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature1.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature1.json index c7135bf1aef4..f0f1816cd881 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature1.json @@ -41,7 +41,6 @@ "end": 21, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature10.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature10.json index d16b7244d0f6..5eec8a07dc2b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature10.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature10.json @@ -41,7 +41,6 @@ "end": 22, "ctxt": 0 }, - "readonly": false, "key": { "type": "NumericLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature11.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature11.json index 575536364c8a..f091b1adbaad 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature11.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature11.json @@ -41,7 +41,6 @@ "end": 24, "ctxt": 0 }, - "readonly": false, "key": { "type": "NumericLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature12.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature12.json index 306206667f13..9cdb6506572d 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature12.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature12.json @@ -41,7 +41,6 @@ "end": 25, "ctxt": 0 }, - "readonly": false, "key": { "type": "NumericLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature2.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature2.json index 323e16cae1ad..9bccea76d80f 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature2.json @@ -41,7 +41,6 @@ "end": 22, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature3.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature3.json index c8b7ecf2d7d0..f4f07b03fc76 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature3.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature3.json @@ -41,7 +41,6 @@ "end": 24, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature4.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature4.json index e2ba74265866..564cba5ea084 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature4.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature4.json @@ -41,7 +41,6 @@ "end": 25, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature5.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature5.json index c18d8ad589a6..2bf8c5860dae 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature5.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature5.json @@ -41,7 +41,6 @@ "end": 23, "ctxt": 0 }, - "readonly": false, "key": { "type": "StringLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature6.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature6.json index 4de2bbccbaef..7856b01cbb65 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature6.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature6.json @@ -41,7 +41,6 @@ "end": 24, "ctxt": 0 }, - "readonly": false, "key": { "type": "StringLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature7.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature7.json index 425376018d9f..64800ed3dee3 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature7.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature7.json @@ -41,7 +41,6 @@ "end": 26, "ctxt": 0 }, - "readonly": false, "key": { "type": "StringLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature8.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature8.json index 78e0f4ace31c..873d179a67f8 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature8.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature8.json @@ -41,7 +41,6 @@ "end": 27, "ctxt": 0 }, - "readonly": false, "key": { "type": "StringLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature9.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature9.json index 94b4014d7e38..6387564653d3 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature9.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature9.json @@ -41,7 +41,6 @@ "end": 21, "ctxt": 0 }, - "readonly": false, "key": { "type": "NumericLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserModifierOnPropertySignature2.json b/crates/swc_ecma_parser/tests/tsc/parserModifierOnPropertySignature2.json index 34ef592cb854..eac2745ecf0a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserModifierOnPropertySignature2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserModifierOnPropertySignature2.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -79,10 +76,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserModule1.json b/crates/swc_ecma_parser/tests/tsc/parserModule1.json index 5c21e02c5318..b30256b3ad9a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserModule1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserModule1.json @@ -131,7 +131,6 @@ "end": 160, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserObjectType2.json b/crates/swc_ecma_parser/tests/tsc/parserObjectType2.json index d3da8118bbbb..b58bca1d4553 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserObjectType2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserObjectType2.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserObjectType3.json b/crates/swc_ecma_parser/tests/tsc/parserObjectType3.json index 711d96935072..53c3cbee3284 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserObjectType3.json +++ b/crates/swc_ecma_parser/tests/tsc/parserObjectType3.json @@ -67,10 +67,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -92,10 +89,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserObjectType4.json b/crates/swc_ecma_parser/tests/tsc/parserObjectType4.json index 6a28bdcf6735..4c45aa2f544c 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserObjectType4.json +++ b/crates/swc_ecma_parser/tests/tsc/parserObjectType4.json @@ -67,10 +67,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -92,10 +89,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserOptionalTypeMembers1.json b/crates/swc_ecma_parser/tests/tsc/parserOptionalTypeMembers1.json index 73b930da5091..3f2fbe720b8a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserOptionalTypeMembers1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserOptionalTypeMembers1.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -136,8 +130,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -154,8 +146,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -177,8 +168,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -195,8 +184,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -205,7 +193,6 @@ "end": 144, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -245,7 +232,6 @@ "end": 168, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserOverloadOnConstants1.json b/crates/swc_ecma_parser/tests/tsc/parserOverloadOnConstants1.json index e0690392ea58..21c1884bcd5b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserOverloadOnConstants1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserOverloadOnConstants1.json @@ -41,7 +41,6 @@ "end": 70, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -119,7 +118,6 @@ "end": 127, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -206,7 +204,6 @@ "end": 178, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -293,7 +290,6 @@ "end": 231, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature1.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature1.json index e014bc33fd59..3ef9bcb30973 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature1.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature10.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature10.json index 262a4dfe9d64..c963a7d32019 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature10.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature10.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature11.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature11.json index 676ec73d1d26..ac08267c2495 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature11.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature11.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature12.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature12.json index d43ed6c4b00e..d6f9f4b1ecc1 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature12.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature12.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature2.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature2.json index da7710a2ee0e..8fef44b086ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature2.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature3.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature3.json index 4a8261eef09d..faa730ea1297 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature3.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature3.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature4.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature4.json index a26795723553..5f0b95233882 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature4.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature4.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature5.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature5.json index 3d08a373f564..f1c7f1695863 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature5.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature5.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature6.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature6.json index bed53cea4b08..d5ff0f052b05 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature6.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature6.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature7.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature7.json index a225ff699c5d..4204a27fd2d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature7.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature7.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature8.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature8.json index 5d5041733bc9..7e11b53c6358 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature8.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature8.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature9.json b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature9.json index f55f0df67036..94a2603235ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserPropertySignature9.json +++ b/crates/swc_ecma_parser/tests/tsc/parserPropertySignature9.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource1.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource1.json index 8db66bd510ac..1aa389b020d2 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource1.json @@ -158,7 +158,6 @@ "end": 391, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -954,7 +953,6 @@ "end": 1059, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -994,7 +992,6 @@ "end": 1085, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1034,7 +1031,6 @@ "end": 1113, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1074,7 +1070,6 @@ "end": 1139, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1114,7 +1109,6 @@ "end": 1165, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1154,7 +1148,6 @@ "end": 1195, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json index 401737e0a8c5..2c924aa998a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource12.json @@ -75,7 +75,6 @@ "end": 307, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -213,8 +212,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -241,8 +238,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -264,8 +260,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -282,8 +276,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserRealSource13.json b/crates/swc_ecma_parser/tests/tsc/parserRealSource13.json index 45d1c11613be..5133cd4a906c 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserRealSource13.json +++ b/crates/swc_ecma_parser/tests/tsc/parserRealSource13.json @@ -94,7 +94,6 @@ "end": 355, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -183,7 +182,6 @@ "end": 408, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -272,7 +270,6 @@ "end": 456, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -361,7 +358,6 @@ "end": 505, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -450,7 +446,6 @@ "end": 553, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -539,7 +534,6 @@ "end": 602, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -628,7 +622,6 @@ "end": 653, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -717,7 +710,6 @@ "end": 702, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -806,7 +798,6 @@ "end": 750, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -895,7 +886,6 @@ "end": 802, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -984,7 +974,6 @@ "end": 855, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1073,7 +1062,6 @@ "end": 903, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1162,7 +1150,6 @@ "end": 952, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1251,7 +1238,6 @@ "end": 999, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1340,7 +1326,6 @@ "end": 1046, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1429,7 +1414,6 @@ "end": 1096, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1518,7 +1502,6 @@ "end": 1145, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1607,7 +1590,6 @@ "end": 1191, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1696,7 +1678,6 @@ "end": 1238, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1785,7 +1766,6 @@ "end": 1286, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1874,7 +1854,6 @@ "end": 1332, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1963,7 +1942,6 @@ "end": 1382, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2052,7 +2030,6 @@ "end": 1432, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2141,7 +2118,6 @@ "end": 1485, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2230,7 +2206,6 @@ "end": 1550, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2319,7 +2294,6 @@ "end": 1601, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2408,7 +2382,6 @@ "end": 1650, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2497,7 +2470,6 @@ "end": 1698, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2586,7 +2558,6 @@ "end": 1745, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2675,7 +2646,6 @@ "end": 1792, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2764,7 +2734,6 @@ "end": 1842, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2853,7 +2822,6 @@ "end": 1892, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2942,7 +2910,6 @@ "end": 1942, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3031,7 +2998,6 @@ "end": 1992, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3120,7 +3086,6 @@ "end": 2042, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3209,7 +3174,6 @@ "end": 2092, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3298,7 +3262,6 @@ "end": 2142, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3387,7 +3350,6 @@ "end": 2191, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3476,7 +3438,6 @@ "end": 2241, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3565,7 +3526,6 @@ "end": 2291, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3654,7 +3614,6 @@ "end": 2341, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3743,7 +3702,6 @@ "end": 2390, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3832,7 +3790,6 @@ "end": 2439, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3921,7 +3878,6 @@ "end": 2489, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4010,7 +3966,6 @@ "end": 2535, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4099,7 +4054,6 @@ "end": 2582, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4188,7 +4142,6 @@ "end": 2629, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4277,7 +4230,6 @@ "end": 2675, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4366,7 +4318,6 @@ "end": 2721, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4455,7 +4406,6 @@ "end": 2768, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4544,7 +4494,6 @@ "end": 2816, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4633,7 +4582,6 @@ "end": 2862, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4722,7 +4670,6 @@ "end": 2908, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4811,7 +4758,6 @@ "end": 2954, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4900,7 +4846,6 @@ "end": 3000, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4989,7 +4934,6 @@ "end": 3047, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5078,7 +5022,6 @@ "end": 3094, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5167,7 +5110,6 @@ "end": 3141, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5256,7 +5198,6 @@ "end": 3188, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5345,7 +5286,6 @@ "end": 3235, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5434,7 +5374,6 @@ "end": 3282, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5523,7 +5462,6 @@ "end": 3329, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5612,7 +5550,6 @@ "end": 3376, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5701,7 +5638,6 @@ "end": 3423, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5790,7 +5726,6 @@ "end": 3473, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5879,7 +5814,6 @@ "end": 3523, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5968,7 +5902,6 @@ "end": 3573, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6057,7 +5990,6 @@ "end": 3624, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6146,7 +6078,6 @@ "end": 3675, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6235,7 +6166,6 @@ "end": 3732, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6324,7 +6254,6 @@ "end": 3794, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6413,7 +6342,6 @@ "end": 3844, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6502,7 +6430,6 @@ "end": 3903, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6591,7 +6518,6 @@ "end": 3954, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6680,7 +6606,6 @@ "end": 4004, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6769,7 +6694,6 @@ "end": 4053, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6858,7 +6782,6 @@ "end": 4105, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -6947,7 +6870,6 @@ "end": 4154, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7036,7 +6958,6 @@ "end": 4201, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7125,7 +7046,6 @@ "end": 4250, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7214,7 +7134,6 @@ "end": 4296, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7303,7 +7222,6 @@ "end": 4345, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7392,7 +7310,6 @@ "end": 4396, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7481,7 +7398,6 @@ "end": 4449, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7570,7 +7486,6 @@ "end": 4497, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7659,7 +7574,6 @@ "end": 4547, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7748,7 +7662,6 @@ "end": 4594, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7837,7 +7750,6 @@ "end": 4646, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -7926,7 +7838,6 @@ "end": 4700, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8015,7 +7926,6 @@ "end": 4751, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8104,7 +8014,6 @@ "end": 4800, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8193,7 +8102,6 @@ "end": 4856, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8282,7 +8190,6 @@ "end": 4912, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8371,7 +8278,6 @@ "end": 4972, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8460,7 +8366,6 @@ "end": 5063, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8549,7 +8454,6 @@ "end": 5145, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8638,7 +8542,6 @@ "end": 5206, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8727,7 +8630,6 @@ "end": 5254, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8816,7 +8718,6 @@ "end": 5308, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8905,7 +8806,6 @@ "end": 5368, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8994,7 +8894,6 @@ "end": 5419, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9083,7 +8982,6 @@ "end": 5469, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9172,7 +9070,6 @@ "end": 5520, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9261,7 +9158,6 @@ "end": 5569, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9350,7 +9246,6 @@ "end": 5620, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9439,7 +9334,6 @@ "end": 5672, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9528,7 +9422,6 @@ "end": 5723, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty1.json b/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty1.json index 3259aff8c041..2d1fbf745749 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty1.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty2.json b/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty2.json index 85583792247a..64d3a474bc4f 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty2.json @@ -41,7 +41,6 @@ "end": 65, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty8.json b/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty8.json index 3a63b95d1d7f..c9db368d6436 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty8.json +++ b/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty8.json @@ -54,7 +54,6 @@ "end": 59, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty9.json b/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty9.json index 3fcfbc0977a3..4b7c77fec0fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty9.json +++ b/crates/swc_ecma_parser/tests/tsc/parserSymbolProperty9.json @@ -85,8 +85,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -103,8 +101,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.json b/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.json index 8b9e3729439e..4819270176de 100644 --- a/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.json +++ b/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples.json @@ -3015,8 +3015,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3071,8 +3069,7 @@ "typeParams": null } } - }, - "typeParams": null + } } ] } @@ -3267,8 +3264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3285,8 +3280,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3327,8 +3321,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3345,8 +3337,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples2.json b/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples2.json index 0cbf99f2f002..7277d9488958 100644 --- a/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples2.json +++ b/crates/swc_ecma_parser/tests/tsc/partiallyNamedTuples2.json @@ -121,7 +121,6 @@ "end": 230, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/privateNameConstructorSignature.json index ff0ee5bccca4..c880233abbfe 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameConstructorSignature.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/privateWriteOnlyAccessorRead.json b/crates/swc_ecma_parser/tests/tsc/privateWriteOnlyAccessorRead.json index 3a04dc5637c0..4bda37553613 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateWriteOnlyAccessorRead.json +++ b/crates/swc_ecma_parser/tests/tsc/privateWriteOnlyAccessorRead.json @@ -105,8 +105,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +140,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,13 +156,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccess.json b/crates/swc_ecma_parser/tests/tsc/propertyAccess.json index 70636b22d0b9..9fe9036767f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccess.json @@ -1265,8 +1265,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1283,8 +1281,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.2.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.2.json index c6a186d4ca1e..470ddeadd5ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.2.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.2.json @@ -84,8 +84,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -102,8 +100,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -239,8 +236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +271,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -294,13 +287,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -446,8 +437,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -500,8 +489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -518,15 +505,13 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.json index 450ad25994da..2ca6113ca72f 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.json @@ -84,8 +84,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -102,8 +100,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -239,8 +236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +271,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -294,13 +287,11 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -446,8 +437,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -500,8 +489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -518,15 +505,13 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } ] } - }, - "typeParams": null + } } ] } @@ -661,8 +646,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -698,8 +681,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -735,8 +716,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -772,8 +751,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -790,23 +767,19 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -982,7 +955,6 @@ "end": 321, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1031,8 +1003,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1068,8 +1038,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1105,8 +1073,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1123,18 +1089,15 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1419,8 +1382,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1437,8 +1398,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints.json index 84fe282f6a38..60120fbceb4d 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints.json @@ -546,8 +546,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -574,8 +572,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json index 436685a1c3ca..db9568b7c405 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json @@ -1268,8 +1268,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1296,8 +1294,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json index 9afc53fc1eb6..6e262be96a90 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json @@ -1268,8 +1268,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1296,8 +1294,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints4.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints4.json index e52b60257234..02247b299170 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints4.json @@ -546,8 +546,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -574,8 +572,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints5.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints5.json index 3a3b79459e31..36e7a0689c61 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints5.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints5.json @@ -919,8 +919,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -947,8 +945,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithoutConstraints.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithoutConstraints.json index bb2d248d18ea..c92373abe746 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithoutConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithoutConstraints.json @@ -500,8 +500,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -528,8 +526,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessWidening.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessWidening.json index 119e36a67fcd..3d75b650ac25 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessWidening.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessWidening.json @@ -662,8 +662,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -680,8 +678,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -703,8 +700,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -721,8 +716,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAssignmentUseParentType1.json b/crates/swc_ecma_parser/tests/tsc/propertyAssignmentUseParentType1.json index 2c78e346f41c..6c5589e59b54 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAssignmentUseParentType1.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAssignmentUseParentType1.json @@ -81,8 +81,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -108,8 +106,7 @@ "raw": "123" } } - }, - "typeParams": null + } } ] } @@ -352,8 +349,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -379,8 +374,7 @@ "raw": "456" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAssignmentUseParentType3.json b/crates/swc_ecma_parser/tests/tsc/propertyAssignmentUseParentType3.json index 94cab2f9570d..b09f72326241 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAssignmentUseParentType3.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAssignmentUseParentType3.json @@ -501,8 +501,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -519,8 +517,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyNameWithoutTypeAnnotation.json b/crates/swc_ecma_parser/tests/tsc/propertyNameWithoutTypeAnnotation.json index e61b57c4e9f6..0d53b749c27a 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyNameWithoutTypeAnnotation.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyNameWithoutTypeAnnotation.json @@ -110,10 +110,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -179,10 +176,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/prototypePropertyAssignmentMergeWithInterfaceMethod.json b/crates/swc_ecma_parser/tests/tsc/prototypePropertyAssignmentMergeWithInterfaceMethod.json index 1202e051dffc..a50ba207a1c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/prototypePropertyAssignmentMergeWithInterfaceMethod.json +++ b/crates/swc_ecma_parser/tests/tsc/prototypePropertyAssignmentMergeWithInterfaceMethod.json @@ -75,7 +75,6 @@ "end": 254, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -232,7 +231,6 @@ "end": 307, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -379,7 +377,6 @@ "end": 335, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -447,7 +444,6 @@ "end": 406, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -660,7 +656,6 @@ "end": 436, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -728,7 +723,6 @@ "end": 466, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/recurringTypeParamForContainerOfBase01.json b/crates/swc_ecma_parser/tests/tsc/recurringTypeParamForContainerOfBase01.json index 230f4dae4011..2a8e2b1eee7a 100644 --- a/crates/swc_ecma_parser/tests/tsc/recurringTypeParamForContainerOfBase01.json +++ b/crates/swc_ecma_parser/tests/tsc/recurringTypeParamForContainerOfBase01.json @@ -132,8 +132,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +158,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -292,8 +289,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -320,8 +315,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -500,8 +494,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -556,8 +548,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveIntersectionTypes.json b/crates/swc_ecma_parser/tests/tsc/recursiveIntersectionTypes.json index b6a1c74d00dc..2183df5ffda1 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveIntersectionTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveIntersectionTypes.json @@ -112,8 +112,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -168,8 +166,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -224,8 +221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -242,8 +237,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -316,8 +310,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -334,8 +326,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json b/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json index d68a712208ee..d29714bd7ac3 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json @@ -1706,8 +1706,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1724,8 +1722,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1778,8 +1775,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1796,8 +1791,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1850,8 +1844,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1923,8 +1915,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3089,8 +3080,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3116,8 +3105,7 @@ "raw": "\"list\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3139,8 +3127,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3157,8 +3143,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3180,8 +3165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3198,8 +3181,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3221,8 +3203,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3239,8 +3219,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3262,8 +3241,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3318,8 +3295,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json index 661ec8849824..1220fd19a020 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json @@ -1424,8 +1424,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1452,8 +1450,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5667,8 +5664,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5685,8 +5680,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json index 076ef5be78c5..cb2f4795bd08 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json @@ -869,8 +869,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -897,8 +895,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } @@ -2452,8 +2449,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2480,8 +2475,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } @@ -2640,8 +2634,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2696,8 +2688,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2984,8 +2975,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3012,8 +3001,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/returnStatements.json b/crates/swc_ecma_parser/tests/tsc/returnStatements.json index f991fdfab787..59614415a14f 100644 --- a/crates/swc_ecma_parser/tests/tsc/returnStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/returnStatements.json @@ -619,8 +619,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -637,8 +635,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/seeTag1.json b/crates/swc_ecma_parser/tests/tsc/seeTag1.json index 3b8149c5fa27..15b221084e13 100644 --- a/crates/swc_ecma_parser/tests/tsc/seeTag1.json +++ b/crates/swc_ecma_parser/tests/tsc/seeTag1.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -160,8 +157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -188,8 +183,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/shadowedInternalModule.json b/crates/swc_ecma_parser/tests/tsc/shadowedInternalModule.json index 19f0f86829a7..d80ea48bfd90 100644 --- a/crates/swc_ecma_parser/tests/tsc/shadowedInternalModule.json +++ b/crates/swc_ecma_parser/tests/tsc/shadowedInternalModule.json @@ -184,8 +184,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -202,8 +200,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -225,8 +222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -243,8 +238,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -517,8 +511,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -535,8 +527,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -558,8 +549,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -576,8 +565,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json index 6cb37f4341d9..697014c5755c 100644 --- a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json @@ -1180,7 +1180,6 @@ "end": 359, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1241,7 +1240,6 @@ "end": 379, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1453,7 +1451,6 @@ "end": 443, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1514,7 +1511,6 @@ "end": 458, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1754,7 +1750,6 @@ "end": 537, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1815,7 +1810,6 @@ "end": 552, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2008,7 +2002,6 @@ "end": 612, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2069,7 +2062,6 @@ "end": 632, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2300,7 +2292,6 @@ "end": 691, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2361,7 +2352,6 @@ "end": 709, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2634,7 +2624,6 @@ "end": 768, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2695,7 +2684,6 @@ "end": 801, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json index 32f49c56235f..0554378c53ab 100644 --- a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json @@ -1432,7 +1432,6 @@ "end": 529, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1493,7 +1492,6 @@ "end": 549, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1545,7 +1543,6 @@ "end": 569, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1796,7 +1793,6 @@ "end": 650, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1857,7 +1853,6 @@ "end": 670, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1909,7 +1904,6 @@ "end": 685, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2188,7 +2182,6 @@ "end": 781, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2249,7 +2242,6 @@ "end": 801, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2301,7 +2293,6 @@ "end": 816, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2533,7 +2524,6 @@ "end": 896, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2585,7 +2575,6 @@ "end": 913, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2646,7 +2635,6 @@ "end": 933, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2916,7 +2904,6 @@ "end": 1012, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2968,7 +2955,6 @@ "end": 1029, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3029,7 +3015,6 @@ "end": 1047, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3341,7 +3326,6 @@ "end": 1126, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3393,7 +3377,6 @@ "end": 1143, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3454,7 +3437,6 @@ "end": 1176, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/spreadContextualTypedBindingPattern.json b/crates/swc_ecma_parser/tests/tsc/spreadContextualTypedBindingPattern.json index 6d67484a26fe..1229781ea757 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadContextualTypedBindingPattern.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadContextualTypedBindingPattern.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadDuplicate.json b/crates/swc_ecma_parser/tests/tsc/spreadDuplicate.json index b0a7581e76db..77766a678e42 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadDuplicate.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadDuplicate.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -249,8 +243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -286,8 +278,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -359,8 +350,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -396,8 +385,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadDuplicateExact.json b/crates/swc_ecma_parser/tests/tsc/spreadDuplicateExact.json index 3241fcfd4dd7..6b3133e4255d 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadDuplicateExact.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadDuplicateExact.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -158,8 +155,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -176,8 +171,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -249,8 +243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -286,8 +278,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -359,8 +350,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -396,8 +385,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadExcessProperty.json b/crates/swc_ecma_parser/tests/tsc/spreadExcessProperty.json index 8d5b0496c450..062675edc6ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadExcessProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadExcessProperty.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -94,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -112,8 +107,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadMethods.json b/crates/swc_ecma_parser/tests/tsc/spreadMethods.json index dd00df008c61..38f260fe451a 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadMethods.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadMethods.json @@ -230,8 +230,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -248,8 +246,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -258,7 +255,6 @@ "end": 161, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -311,8 +307,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -329,8 +323,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadNonPrimitive.json b/crates/swc_ecma_parser/tests/tsc/spreadNonPrimitive.json index eb28838abbd8..e9a9f41985f0 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadNonPrimitive.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadNonPrimitive.json @@ -116,8 +116,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -134,8 +132,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -157,8 +154,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -175,8 +170,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json b/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json index 07220b9c5683..9543b9188d1d 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json @@ -1360,8 +1360,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1444,8 +1442,7 @@ } ] } - }, - "typeParams": null + } } ] }, @@ -1535,8 +1532,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1563,8 +1558,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadOverwritesProperty.json b/crates/swc_ecma_parser/tests/tsc/spreadOverwritesProperty.json index 4f38a6ee17e7..f770bd2f5092 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadOverwritesProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadOverwritesProperty.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -108,8 +105,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +121,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -240,8 +231,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,8 +247,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -580,8 +568,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -617,8 +603,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -772,8 +757,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -790,8 +773,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadOverwritesPropertyStrict.json b/crates/swc_ecma_parser/tests/tsc/spreadOverwritesPropertyStrict.json index 4f96097cc20c..0d2e7c0d21ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadOverwritesPropertyStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadOverwritesPropertyStrict.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -108,8 +105,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +121,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -199,8 +193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -217,8 +209,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -240,8 +231,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,8 +247,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -746,8 +734,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -783,8 +769,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -946,8 +931,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -964,8 +947,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -1138,8 +1120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1156,8 +1136,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -1189,8 +1168,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1207,8 +1184,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1400,8 +1376,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1418,8 +1392,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1441,8 +1414,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1459,8 +1430,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1784,8 +1754,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1802,8 +1770,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1825,8 +1792,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1843,8 +1808,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2060,8 +2024,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2078,8 +2040,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -2233,8 +2194,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2251,8 +2210,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadUnion.json b/crates/swc_ecma_parser/tests/tsc/spreadUnion.json index 5396c10a2dc8..671df8e59034 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadUnion.json @@ -75,8 +75,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -93,8 +91,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -227,8 +221,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -245,8 +237,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -278,8 +269,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -296,8 +285,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -439,8 +427,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -457,8 +443,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] }, @@ -490,8 +475,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -508,8 +491,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -531,8 +513,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -549,8 +529,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -714,8 +693,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -732,8 +709,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -765,8 +741,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -783,8 +757,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -816,8 +789,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -834,8 +805,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -857,8 +827,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -875,8 +843,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadUnion2.json b/crates/swc_ecma_parser/tests/tsc/spreadUnion2.json index 10b81d4212f1..3015c70be7a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadUnion2.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadUnion2.json @@ -75,8 +75,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -93,8 +91,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -185,8 +182,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -203,8 +198,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -304,8 +298,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -322,8 +314,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -474,8 +465,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -492,8 +481,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -644,8 +632,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -662,8 +648,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -695,8 +680,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -713,8 +696,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -746,8 +728,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -764,8 +744,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -787,8 +766,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -805,8 +782,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1053,8 +1029,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1071,8 +1045,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1241,8 +1214,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1259,8 +1230,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/spreadUnion3.json b/crates/swc_ecma_parser/tests/tsc/spreadUnion3.json index 8e533ce15a18..98d09fe5153f 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadUnion3.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadUnion3.json @@ -80,8 +80,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -98,8 +96,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -231,8 +228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -249,8 +244,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -372,8 +366,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -390,8 +382,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/spreadUnion4.json b/crates/swc_ecma_parser/tests/tsc/spreadUnion4.json index 636f38a581fd..b39168310aed 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadUnion4.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadUnion4.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -103,8 +101,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -176,8 +173,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -212,8 +207,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/strictBindCallApply2.json b/crates/swc_ecma_parser/tests/tsc/strictBindCallApply2.json index 56a8222dbc6e..01940eb236ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/strictBindCallApply2.json +++ b/crates/swc_ecma_parser/tests/tsc/strictBindCallApply2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringEnumInElementAccess01.json b/crates/swc_ecma_parser/tests/tsc/stringEnumInElementAccess01.json index fc36840a728c..c02fe3594eed 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringEnumInElementAccess01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringEnumInElementAccess01.json @@ -160,8 +160,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -178,8 +176,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -201,8 +198,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -219,8 +214,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -242,8 +236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -260,8 +252,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes1.json b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes1.json index 17c5aa949efc..8ae8956f16e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes1.json @@ -3681,8 +3681,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3722,8 +3720,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3745,8 +3742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3763,8 +3758,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -3796,8 +3790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3837,8 +3829,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3860,8 +3851,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3878,8 +3867,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes2.json index 0c1b0e2ec3d4..235daa2f6cbf 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/stringEnumLiteralTypes2.json @@ -3681,8 +3681,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3722,8 +3720,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3745,8 +3742,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3763,8 +3758,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -3796,8 +3790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3837,8 +3829,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3860,8 +3851,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3878,8 +3867,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringIndexerConstrainsPropertyDeclarations.json b/crates/swc_ecma_parser/tests/tsc/stringIndexerConstrainsPropertyDeclarations.json index 402440c61c95..1e79934f8c1e 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringIndexerConstrainsPropertyDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/stringIndexerConstrainsPropertyDeclarations.json @@ -74,8 +74,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -92,8 +90,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1191,8 +1188,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1209,8 +1204,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1232,8 +1226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1250,8 +1242,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1273,8 +1264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1309,8 +1298,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1332,8 +1320,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1350,8 +1336,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1373,8 +1358,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1391,8 +1374,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1414,8 +1396,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1432,8 +1412,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1455,8 +1434,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1473,8 +1450,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsCallSignatureDeclaration", @@ -1549,7 +1525,6 @@ "end": 986, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1602,8 +1577,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1620,8 +1593,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1643,8 +1615,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1661,8 +1631,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1684,8 +1653,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1712,8 +1679,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1835,8 +1801,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1853,8 +1817,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1876,8 +1839,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1894,8 +1855,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1917,8 +1877,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1953,8 +1911,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1976,8 +1933,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1994,8 +1949,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2017,8 +1971,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2035,8 +1987,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2058,8 +2009,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2076,8 +2025,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2099,8 +2047,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2117,8 +2063,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsCallSignatureDeclaration", @@ -2193,7 +2138,6 @@ "end": 1343, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2246,8 +2190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2264,8 +2206,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2287,8 +2228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2305,8 +2244,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2328,8 +2266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2356,8 +2292,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringIndexerConstrainsPropertyDeclarations2.json b/crates/swc_ecma_parser/tests/tsc/stringIndexerConstrainsPropertyDeclarations2.json index 40a770094d5a..bf388ae89948 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringIndexerConstrainsPropertyDeclarations2.json +++ b/crates/swc_ecma_parser/tests/tsc/stringIndexerConstrainsPropertyDeclarations2.json @@ -638,8 +638,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -666,8 +664,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -689,8 +686,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -717,8 +712,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -740,8 +734,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -758,8 +750,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -781,8 +772,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -799,8 +788,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -932,8 +920,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -960,8 +946,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -983,8 +968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1011,8 +994,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1034,8 +1016,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1052,8 +1032,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1075,8 +1054,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1093,8 +1070,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringIndexingResults.json b/crates/swc_ecma_parser/tests/tsc/stringIndexingResults.json index 8a3990f17a8d..9522e6e7cdc4 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringIndexingResults.json +++ b/crates/swc_ecma_parser/tests/tsc/stringIndexingResults.json @@ -494,8 +494,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -512,8 +510,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -898,8 +895,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -916,8 +911,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json index 3f4b68fc278f..0d433d9bd351 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json @@ -4693,8 +4693,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4711,8 +4709,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags01.json index b3f05fdea8b2..7158f86a1459 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags01.json @@ -120,8 +120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -148,8 +146,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -222,8 +219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -249,8 +244,7 @@ "raw": "\"A\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -272,8 +266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -290,8 +282,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -364,8 +355,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -391,8 +380,7 @@ "raw": "\"B\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -414,8 +402,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -432,8 +418,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags02.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags02.json index a3d8bdb4e35e..45aa46e3da29 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags02.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags02.json @@ -120,8 +120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -148,8 +146,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -222,8 +219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -249,8 +244,7 @@ "raw": "\"A\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -272,8 +266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -290,8 +282,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -364,8 +355,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -391,8 +380,7 @@ "raw": "\"B\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -414,8 +402,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -432,8 +418,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags03.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags03.json index f1ada73967c1..a5c5e853d98c 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags03.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTags03.json @@ -120,8 +120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -148,8 +146,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -222,8 +219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -249,8 +244,7 @@ "raw": "\"A\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -272,8 +266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -290,8 +282,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -364,8 +355,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -391,8 +380,7 @@ "raw": "\"B\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -414,8 +402,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -432,8 +418,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures.json index 3a494505a30f..b4a498f6724d 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures.json @@ -526,7 +526,6 @@ "end": 249, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -715,7 +714,6 @@ "end": 294, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures2.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures2.json index 709790090ca1..80f0f78ae321 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesInImplementationSignatures2.json @@ -474,7 +474,6 @@ "end": 234, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -571,7 +570,6 @@ "end": 261, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -808,7 +806,6 @@ "end": 320, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -869,7 +866,6 @@ "end": 337, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads03.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads03.json index e93478328a3c..d25d26a5dd5d 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads03.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads03.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -187,8 +181,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -205,8 +197,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -279,8 +270,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -297,8 +286,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -371,8 +359,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -389,8 +375,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads05.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads05.json index 6735c7e1c11a..636910f4dd3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads05.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesOverloads05.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] } @@ -154,8 +151,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -172,8 +167,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] } @@ -246,8 +240,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -264,8 +256,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] } @@ -338,8 +329,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -356,8 +345,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralsAssertionsInEqualityComparisons02.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralsAssertionsInEqualityComparisons02.json index 0fbd44426220..7d1b5f0e3ce6 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralsAssertionsInEqualityComparisons02.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralsAssertionsInEqualityComparisons02.json @@ -70,8 +70,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -88,8 +86,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralsWithEqualityChecks03.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralsWithEqualityChecks03.json index d8d1802fc120..98bf0435854b 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralsWithEqualityChecks03.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralsWithEqualityChecks03.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralsWithEqualityChecks04.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralsWithEqualityChecks04.json index b14a0e2a0d11..e9d291e33144 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralsWithEqualityChecks04.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralsWithEqualityChecks04.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/stringMappingReduction.json b/crates/swc_ecma_parser/tests/tsc/stringMappingReduction.json index 31cfba96899d..e1cccc1c4d38 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringMappingReduction.json +++ b/crates/swc_ecma_parser/tests/tsc/stringMappingReduction.json @@ -1157,8 +1157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1175,8 +1173,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] } @@ -1474,7 +1471,6 @@ "end": 992, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/stringNamedPropertyAccess.json b/crates/swc_ecma_parser/tests/tsc/stringNamedPropertyAccess.json index 2502380c30bb..b05118aac024 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringNamedPropertyAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/stringNamedPropertyAccess.json @@ -366,8 +366,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -384,8 +382,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -578,8 +575,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -596,8 +591,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json index 19d526876206..dbd131045be1 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json @@ -110,8 +110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -128,8 +126,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -238,8 +235,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +251,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -366,8 +360,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -384,8 +376,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -494,8 +485,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -512,8 +501,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -622,8 +610,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -650,8 +636,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -760,8 +745,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -788,8 +771,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -898,8 +880,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -935,8 +915,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -953,13 +931,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -1068,8 +1044,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1094,8 +1068,7 @@ "kind": "number" } } - }, - "typeParams": null + } } ] } @@ -1204,8 +1177,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1232,8 +1203,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1414,8 +1384,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1442,8 +1410,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1666,8 +1633,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1712,8 +1677,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -1822,8 +1786,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1870,8 +1832,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1980,8 +1941,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2096,8 +2055,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2247,8 +2205,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2275,8 +2231,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2499,8 +2454,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2527,8 +2480,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } @@ -2789,8 +2741,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2817,8 +2767,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } @@ -2959,8 +2908,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2987,8 +2934,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3152,8 +3098,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3180,8 +3124,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3290,8 +3233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3318,8 +3259,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3428,8 +3368,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3446,8 +3384,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json index e1068f0e1dc3..ff2b3bee752f 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json @@ -663,8 +663,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -681,8 +679,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json index 566c0246e312..b450641a0cad 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json @@ -1768,8 +1768,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1786,8 +1784,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4435,8 +4432,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4453,8 +4448,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json index 3c8e71ad43bc..629aec7630e0 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json @@ -768,8 +768,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -786,8 +784,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -809,8 +806,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -827,8 +822,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -850,8 +844,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -868,8 +860,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -891,8 +882,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -909,8 +898,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -932,8 +920,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -960,8 +946,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -983,8 +968,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1011,8 +994,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1034,8 +1016,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1062,8 +1042,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1085,8 +1064,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1122,8 +1099,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1140,13 +1115,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1168,8 +1141,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1196,8 +1167,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1219,8 +1189,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1247,8 +1215,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1270,8 +1237,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1316,8 +1281,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1339,8 +1303,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1387,8 +1349,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1410,8 +1371,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1526,8 +1485,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1549,8 +1507,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1577,8 +1533,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1600,8 +1555,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1628,8 +1581,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1651,8 +1603,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1679,8 +1629,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1702,8 +1651,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1730,8 +1677,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1753,8 +1699,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1771,8 +1715,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] } @@ -1942,8 +1885,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1960,8 +1901,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1983,8 +1923,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2001,8 +1939,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2024,8 +1961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2042,8 +1977,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2065,8 +1999,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2083,8 +2015,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2106,8 +2037,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2134,8 +2063,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2157,8 +2085,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2185,8 +2111,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2208,8 +2133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2236,8 +2159,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2259,8 +2181,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2296,8 +2216,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2314,13 +2232,11 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2342,8 +2258,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2370,8 +2284,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2393,8 +2306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2421,8 +2332,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2444,8 +2354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2490,8 +2398,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2513,8 +2420,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2561,8 +2466,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2584,8 +2488,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2700,8 +2602,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2723,8 +2624,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2751,8 +2650,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2774,8 +2672,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2802,8 +2698,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2825,8 +2720,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2853,8 +2746,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2876,8 +2768,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2904,8 +2794,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2927,8 +2816,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2945,8 +2832,7 @@ }, "members": [] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json index 411dbc985fd1..2db88504c542 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json @@ -3340,8 +3340,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3358,8 +3356,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3409,8 +3406,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3427,8 +3422,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3450,8 +3444,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3468,8 +3460,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -4426,8 +4417,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4444,8 +4433,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4467,8 +4455,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4485,8 +4471,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -11125,8 +11110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11143,8 +11126,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11166,8 +11148,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11184,8 +11164,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -12723,8 +12702,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12741,8 +12718,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -12792,8 +12768,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12810,8 +12784,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -12833,8 +12806,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12851,8 +12822,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -14592,8 +14562,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14620,8 +14588,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14643,8 +14610,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14671,8 +14636,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -14828,8 +14792,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14846,8 +14808,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14869,8 +14830,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14887,8 +14846,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json index de7e2a85d3f8..51fa56c10202 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json @@ -1701,8 +1701,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1719,8 +1717,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1770,8 +1767,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1788,8 +1783,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1811,8 +1805,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1829,8 +1821,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2432,8 +2423,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2450,8 +2439,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2473,8 +2461,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2491,8 +2477,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5661,8 +5646,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5679,8 +5662,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7242,8 +7224,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7260,8 +7240,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -7311,8 +7290,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7329,8 +7306,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7352,8 +7328,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7370,8 +7344,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -8434,8 +8407,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8462,8 +8433,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8485,8 +8455,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8513,8 +8481,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8677,8 +8644,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8695,8 +8660,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8718,8 +8682,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8736,8 +8698,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -9045,8 +9006,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9073,8 +9032,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9096,8 +9054,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9124,8 +9080,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json index 914c13fe4fc5..378be681eb31 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json @@ -2050,8 +2050,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2078,8 +2076,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2129,8 +2126,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2157,8 +2152,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2180,8 +2174,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2208,8 +2200,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2462,8 +2453,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2490,8 +2479,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2513,8 +2501,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2541,8 +2527,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2803,8 +2788,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2831,8 +2814,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2854,8 +2836,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2882,8 +2862,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7839,8 +7818,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7867,8 +7844,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7918,8 +7894,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7946,8 +7920,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7969,8 +7942,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7997,8 +7968,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8184,8 +8154,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8212,8 +8180,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8263,8 +8230,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8291,8 +8256,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8314,8 +8278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8342,8 +8304,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8708,8 +8669,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8736,8 +8695,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8759,8 +8717,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8787,8 +8743,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8982,8 +8937,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9010,8 +8963,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9033,8 +8985,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9061,8 +9011,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -9435,8 +9384,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9463,8 +9410,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9486,8 +9432,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9514,8 +9458,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -9704,8 +9647,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9732,8 +9673,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9755,8 +9695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9783,8 +9721,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithOptionalParameters.json index 27c535abdbd8..e6c819d036d1 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithOptionalParameters.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -113,8 +110,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -177,8 +172,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -200,8 +194,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -264,8 +256,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -287,8 +278,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -378,8 +367,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -401,8 +389,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -492,8 +478,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -566,8 +551,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -602,8 +585,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -676,8 +658,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -740,8 +720,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -814,8 +793,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -878,8 +855,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -952,8 +928,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -988,8 +962,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1062,8 +1035,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1126,8 +1097,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1200,8 +1170,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1264,8 +1232,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1338,8 +1305,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1374,8 +1339,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1448,8 +1412,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1512,8 +1474,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1586,8 +1547,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1650,8 +1609,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1724,8 +1682,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1815,8 +1771,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1889,8 +1844,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1925,8 +1878,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1999,8 +1951,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2090,8 +2040,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2164,8 +2113,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2228,8 +2175,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2302,8 +2248,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2393,8 +2337,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2467,8 +2410,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2503,8 +2444,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2577,8 +2517,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2668,8 +2606,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2742,8 +2679,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2806,8 +2741,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2880,8 +2814,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2971,8 +2903,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithRestParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithRestParameters.json index f58a727a5815..500e835ff533 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithRestParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithRestParameters.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +138,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -163,8 +160,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +271,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -299,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -439,8 +431,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -462,8 +453,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -602,8 +591,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -676,8 +664,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -712,8 +698,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -786,8 +771,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -872,8 +855,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -946,8 +928,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1032,8 +1012,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1106,8 +1085,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1170,8 +1147,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1244,8 +1220,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1362,8 +1336,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1436,8 +1409,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1500,8 +1471,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1574,8 +1544,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1638,8 +1606,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1712,8 +1679,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1748,8 +1713,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1822,8 +1786,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1908,8 +1870,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1982,8 +1943,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2046,8 +2005,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2120,8 +2078,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2184,8 +2140,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2258,8 +2213,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2371,8 +2324,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2445,8 +2397,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2558,8 +2508,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2632,8 +2581,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2723,8 +2670,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2797,8 +2743,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2888,8 +2832,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2962,8 +2905,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2998,8 +2939,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3072,8 +3012,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3136,8 +3074,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3210,8 +3147,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3274,8 +3209,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3348,8 +3282,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3439,8 +3371,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3513,8 +3444,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3631,8 +3560,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3705,8 +3633,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3818,8 +3744,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3892,8 +3817,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4010,8 +3933,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4084,8 +4006,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4197,8 +4117,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4271,8 +4190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4307,8 +4224,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4381,8 +4297,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4472,8 +4386,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4546,8 +4459,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4610,8 +4521,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4684,8 +4594,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4775,8 +4683,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4849,8 +4756,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4940,8 +4845,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5014,8 +4918,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5127,8 +5029,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5201,8 +5102,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5287,8 +5186,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json index d204c471606c..aea3e77feb1b 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json @@ -1050,8 +1050,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1188,8 +1186,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1211,8 +1208,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1403,8 +1398,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1426,8 +1420,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1532,8 +1524,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1606,8 +1597,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1670,8 +1659,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1693,8 +1681,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1784,8 +1770,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1807,8 +1792,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1913,8 +1896,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1967,8 +1949,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2105,8 +2085,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2128,8 +2107,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2244,8 +2221,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2318,8 +2294,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2382,8 +2356,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2456,8 +2429,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2562,8 +2533,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json index 1f7b83b571c9..e5c1130d5b3d 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json @@ -3360,8 +3360,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3378,8 +3376,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3429,8 +3426,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3447,8 +3442,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3470,8 +3464,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3488,8 +3480,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -4449,8 +4440,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4467,8 +4456,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4490,8 +4478,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4508,8 +4494,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -11303,8 +11288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11321,8 +11304,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -11344,8 +11326,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11362,8 +11342,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -12929,8 +12908,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12947,8 +12924,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -12998,8 +12974,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13016,8 +12990,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -13039,8 +13012,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13057,8 +13028,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -14813,8 +14783,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14841,8 +14809,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -14864,8 +14831,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -14892,8 +14857,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -15054,8 +15018,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15072,8 +15034,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -15095,8 +15056,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -15113,8 +15072,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json index 19791653819a..0fa30ea5c6d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json @@ -1710,8 +1710,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1728,8 +1726,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1779,8 +1776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1797,8 +1792,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1820,8 +1814,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1838,8 +1830,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2443,8 +2434,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2461,8 +2450,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2484,8 +2472,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2502,8 +2488,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5447,8 +5432,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5465,8 +5448,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7031,8 +7013,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7049,8 +7029,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -7100,8 +7079,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7118,8 +7095,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7141,8 +7117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7159,8 +7133,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -8217,8 +8190,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8245,8 +8216,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8268,8 +8238,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8296,8 +8264,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8458,8 +8425,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8476,8 +8441,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8499,8 +8463,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8517,8 +8479,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -8839,8 +8800,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8867,8 +8826,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8890,8 +8848,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8918,8 +8874,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json index 0b9104f0af31..49c2a45d2d18 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json @@ -2058,8 +2058,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2086,8 +2084,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2137,8 +2134,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2165,8 +2160,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2188,8 +2182,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2216,8 +2208,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2471,8 +2462,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2499,8 +2488,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2522,8 +2510,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2550,8 +2536,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2813,8 +2798,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2841,8 +2824,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2864,8 +2846,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2892,8 +2872,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7903,8 +7882,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7931,8 +7908,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7982,8 +7958,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8010,8 +7984,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8033,8 +8006,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8061,8 +8032,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8246,8 +8216,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8274,8 +8242,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8325,8 +8292,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8353,8 +8318,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8376,8 +8340,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8404,8 +8366,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8768,8 +8729,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8796,8 +8755,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8819,8 +8777,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8847,8 +8803,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -9040,8 +8995,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9068,8 +9021,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9091,8 +9043,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9119,8 +9069,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -9491,8 +9440,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9519,8 +9466,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9542,8 +9488,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9570,8 +9514,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -9758,8 +9701,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9786,8 +9727,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9809,8 +9749,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9837,8 +9775,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json index f9885758a414..0720e8eba086 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -442,8 +440,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -465,8 +462,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -538,8 +533,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -561,8 +555,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -626,8 +618,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -649,8 +640,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -741,8 +730,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -764,8 +752,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -875,8 +861,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -898,8 +883,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1039,8 +1022,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1062,8 +1044,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1259,8 +1239,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1282,8 +1261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1572,8 +1549,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1595,8 +1571,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1885,8 +1859,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1908,8 +1881,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2015,8 +1986,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2038,8 +2008,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2099,8 +2067,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2117,8 +2083,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2168,8 +2133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2186,8 +2149,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2209,8 +2171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2227,8 +2187,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2265,8 +2224,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2288,8 +2246,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2494,8 +2450,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2517,8 +2472,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2723,8 +2676,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2746,8 +2698,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2807,8 +2757,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2825,8 +2773,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2848,8 +2795,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2866,8 +2811,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2904,8 +2848,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2978,8 +2921,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3103,8 +3044,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3177,8 +3117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3302,8 +3240,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3325,8 +3262,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3440,8 +3375,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3463,8 +3397,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3580,8 +3512,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3603,8 +3534,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3780,8 +3709,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3803,8 +3731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3999,8 +3925,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4022,8 +3947,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4254,8 +4177,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4277,8 +4199,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4565,8 +4485,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4588,8 +4507,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4969,8 +4886,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4992,8 +4908,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5170,8 +5084,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5188,8 +5100,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5211,8 +5122,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5229,8 +5138,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5446,8 +5354,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5469,8 +5376,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5626,8 +5531,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5649,8 +5553,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5821,8 +5723,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5844,8 +5745,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6100,8 +5999,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6123,8 +6021,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6351,8 +6247,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6374,8 +6269,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6435,8 +6328,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6463,8 +6354,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6486,8 +6376,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6514,8 +6402,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6607,8 +6494,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json index c65bf11dff80..95a70b497d95 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json @@ -369,8 +369,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -494,8 +492,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -517,8 +514,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -632,8 +627,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -655,8 +649,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -762,8 +754,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -785,8 +776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -952,8 +941,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -975,8 +963,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1171,8 +1157,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1194,8 +1179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1385,8 +1368,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1408,8 +1390,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1469,8 +1449,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1497,8 +1475,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1548,8 +1525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1576,8 +1551,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1599,8 +1573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1627,8 +1599,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1697,8 +1668,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1720,8 +1690,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1781,8 +1749,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1809,8 +1775,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1832,8 +1797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1860,8 +1823,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1938,8 +1900,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1961,8 +1922,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2022,8 +1981,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2050,8 +2007,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2073,8 +2029,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2101,8 +2055,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2197,8 +2150,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2303,8 +2255,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2396,8 +2346,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2502,8 +2451,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2585,8 +2532,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2691,8 +2637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2776,8 +2720,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2882,8 +2825,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3026,8 +2967,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3132,8 +3072,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3305,8 +3243,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3411,8 +3348,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3472,8 +3407,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3500,8 +3433,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3551,8 +3483,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3579,8 +3509,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3602,8 +3531,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3630,8 +3557,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3700,8 +3626,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3806,8 +3731,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3867,8 +3790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3895,8 +3816,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3918,8 +3838,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3946,8 +3864,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -3992,8 +3909,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithOptionalParameters.json index 41da38a3e5f9..f7bb3251516f 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithOptionalParameters.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -91,8 +89,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -114,8 +111,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -179,8 +174,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -202,8 +196,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +259,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -290,8 +281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -382,8 +371,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -405,8 +393,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -497,8 +483,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -571,8 +556,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -608,8 +591,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -682,8 +664,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -747,8 +727,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -821,8 +800,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -886,8 +863,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -960,8 +936,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -997,8 +971,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1071,8 +1044,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1136,8 +1107,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1210,8 +1180,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1275,8 +1243,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1349,8 +1316,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1386,8 +1351,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1460,8 +1424,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1525,8 +1487,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1599,8 +1560,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1664,8 +1623,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1738,8 +1696,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1830,8 +1786,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1904,8 +1859,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1941,8 +1894,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2015,8 +1967,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2107,8 +2057,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2181,8 +2130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2246,8 +2193,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2320,8 +2266,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2412,8 +2356,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2486,8 +2429,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2523,8 +2464,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2597,8 +2537,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2689,8 +2627,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2763,8 +2700,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2828,8 +2763,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2902,8 +2836,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2994,8 +2926,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json index bb2a0730b80a..82697a30fc40 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json @@ -1050,8 +1050,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1188,8 +1186,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1211,8 +1208,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1403,8 +1398,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1426,8 +1420,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1533,8 +1525,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1607,8 +1598,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1672,8 +1661,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1695,8 +1683,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1787,8 +1773,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1810,8 +1795,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1917,8 +1900,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1971,8 +1953,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2109,8 +2089,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2132,8 +2111,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2249,8 +2226,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2323,8 +2299,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2388,8 +2362,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2462,8 +2435,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2569,8 +2540,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json index e66265688d25..c8c66fba01a5 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json @@ -113,8 +113,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -159,8 +157,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -182,8 +179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -266,8 +261,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -289,8 +283,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -373,8 +365,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -396,8 +387,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -517,8 +506,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -540,8 +528,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -661,8 +647,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -795,8 +780,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -841,8 +824,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -975,8 +957,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1059,8 +1039,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1193,8 +1172,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1277,8 +1254,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1411,8 +1387,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1457,8 +1431,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1591,8 +1564,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1675,8 +1646,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1809,8 +1779,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1893,8 +1861,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2027,8 +1994,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2073,8 +2038,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2207,8 +2171,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2291,8 +2253,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2425,8 +2386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2509,8 +2468,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2643,8 +2601,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2764,8 +2720,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2898,8 +2853,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2944,8 +2897,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3078,8 +3030,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3199,8 +3149,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3333,8 +3282,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3417,8 +3364,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3551,8 +3497,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3672,8 +3616,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3806,8 +3749,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3852,8 +3793,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3986,8 +3926,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4107,8 +4045,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4241,8 +4178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4325,8 +4260,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4459,8 +4393,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4580,8 +4512,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4664,8 +4595,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4742,8 +4671,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4765,8 +4693,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4881,8 +4807,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4904,8 +4829,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5020,8 +4943,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5043,8 +4965,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5196,8 +5116,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5219,8 +5138,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5372,8 +5289,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5478,8 +5394,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5524,8 +5438,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5630,8 +5543,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5714,8 +5625,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -5820,8 +5730,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5904,8 +5812,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6010,8 +5917,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6056,8 +5961,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6162,8 +6066,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6246,8 +6148,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6352,8 +6253,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6436,8 +6335,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6542,8 +6440,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6588,8 +6484,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6694,8 +6589,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6778,8 +6671,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6884,8 +6776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6968,8 +6858,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -7074,8 +6963,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7195,8 +7082,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -7301,8 +7187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7347,8 +7231,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -7453,8 +7336,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7574,8 +7455,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -7680,8 +7560,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7764,8 +7642,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -7870,8 +7747,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7991,8 +7866,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -8097,8 +7971,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8143,8 +8015,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -8249,8 +8120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8370,8 +8239,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -8476,8 +8344,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8560,8 +8426,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -8666,8 +8531,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8787,8 +8650,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -8871,8 +8733,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8949,8 +8809,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8972,8 +8831,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9088,8 +8945,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9111,8 +8967,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9227,8 +9081,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9250,8 +9103,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9403,8 +9254,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9426,8 +9276,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9579,8 +9427,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -9653,8 +9500,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9731,8 +9576,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -9805,8 +9649,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9921,8 +9763,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -9995,8 +9836,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10111,8 +9950,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -10185,8 +10023,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10263,8 +10099,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -10337,8 +10172,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10453,8 +10286,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -10527,8 +10359,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10643,8 +10473,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -10717,8 +10546,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10795,8 +10622,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -10869,8 +10695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10985,8 +10809,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -11059,8 +10882,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11175,8 +10996,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -11249,8 +11069,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11402,8 +11220,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -11476,8 +11293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11554,8 +11369,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -11628,8 +11442,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11781,8 +11593,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -11855,8 +11666,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11971,8 +11780,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -12045,8 +11853,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12198,8 +12004,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -12272,8 +12077,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12350,8 +12153,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -12424,8 +12226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12577,8 +12377,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -12651,8 +12450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12767,8 +12564,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -12841,8 +12637,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12994,8 +12788,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json index db0c325b4e00..1148ce12ce43 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json @@ -113,8 +113,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +158,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -183,8 +180,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -268,8 +263,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -291,8 +285,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -376,8 +368,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -399,8 +390,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -521,8 +510,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -544,8 +532,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -666,8 +652,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -800,8 +785,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -847,8 +830,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -981,8 +963,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1066,8 +1046,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1200,8 +1179,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1285,8 +1262,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1419,8 +1395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1466,8 +1440,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1600,8 +1573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1685,8 +1656,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -1819,8 +1789,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1904,8 +1872,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2038,8 +2005,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2085,8 +2050,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2219,8 +2183,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2304,8 +2266,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2438,8 +2399,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2523,8 +2482,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2657,8 +2615,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2779,8 +2735,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -2913,8 +2868,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2960,8 +2913,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3094,8 +3046,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3216,8 +3166,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3350,8 +3299,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3435,8 +3382,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3569,8 +3515,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3691,8 +3635,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -3825,8 +3768,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3872,8 +3813,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -4006,8 +3946,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4128,8 +4066,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -4262,8 +4199,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4347,8 +4282,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -4481,8 +4415,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4603,8 +4535,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -4687,8 +4618,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4766,8 +4695,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4789,8 +4717,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4906,8 +4832,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4929,8 +4854,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5046,8 +4969,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5069,8 +4991,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5223,8 +5143,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5246,8 +5165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5400,8 +5317,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -5506,8 +5422,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5553,8 +5467,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -5659,8 +5572,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5744,8 +5655,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -5850,8 +5760,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5935,8 +5843,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -6041,8 +5948,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6088,8 +5993,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -6194,8 +6098,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6279,8 +6181,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -6385,8 +6286,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6470,8 +6369,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -6576,8 +6474,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6623,8 +6519,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -6729,8 +6624,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6814,8 +6707,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -6920,8 +6812,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7005,8 +6895,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -7111,8 +7000,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7233,8 +7120,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -7339,8 +7225,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7386,8 +7270,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -7492,8 +7375,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7614,8 +7495,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -7720,8 +7600,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7805,8 +7683,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -7911,8 +7788,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8033,8 +7908,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -8139,8 +8013,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8186,8 +8058,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -8292,8 +8163,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8414,8 +8283,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -8520,8 +8388,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8605,8 +8471,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -8711,8 +8576,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8833,8 +8696,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -8917,8 +8779,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8996,8 +8856,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9019,8 +8878,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9136,8 +8993,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9159,8 +9015,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9276,8 +9130,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9299,8 +9152,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9453,8 +9304,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -9476,8 +9326,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9630,8 +9478,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -9704,8 +9551,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9783,8 +9628,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -9857,8 +9701,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -9974,8 +9816,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -10048,8 +9889,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10165,8 +10004,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -10239,8 +10077,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10318,8 +10154,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -10392,8 +10227,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10509,8 +10342,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -10583,8 +10415,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10700,8 +10530,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -10774,8 +10603,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10853,8 +10680,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -10927,8 +10753,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11044,8 +10868,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -11118,8 +10941,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11235,8 +11056,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -11309,8 +11129,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11463,8 +11281,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -11537,8 +11354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11616,8 +11431,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -11690,8 +11504,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11844,8 +11656,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -11918,8 +11729,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12035,8 +11844,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -12109,8 +11917,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12263,8 +12069,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -12337,8 +12142,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12416,8 +12219,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -12490,8 +12292,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12644,8 +12444,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -12718,8 +12517,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12835,8 +12632,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } @@ -12909,8 +12705,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13063,8 +12857,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer.json index 744fd4e6a2ff..757d24a40c37 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer2.json index 2010ed7ea9d5..f984e8fb3204 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer3.json index 1b1947a4d3f2..d07578c0fe5b 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer3.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer4.json index a369b1b904f7..35b3362140a7 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer4.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer5.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer5.json index ba76af11235b..279a8bbc4725 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer5.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer5.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers2.json index 1c6d7fdfdbbf..424f8f09a734 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -245,8 +239,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -273,8 +265,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -296,8 +287,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -324,8 +313,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -398,8 +386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -426,8 +412,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -449,8 +434,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -467,8 +450,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -521,8 +503,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -549,8 +529,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -572,8 +551,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -600,8 +577,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -674,8 +650,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -702,8 +676,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -725,8 +698,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -743,8 +714,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -797,8 +767,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -825,8 +793,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -848,8 +815,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -876,8 +841,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -950,8 +914,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -978,8 +940,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1001,8 +962,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1019,8 +978,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1103,8 +1061,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1131,8 +1087,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1154,8 +1109,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1182,8 +1135,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1256,8 +1208,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1284,8 +1234,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1307,8 +1256,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1325,8 +1272,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1379,8 +1325,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1407,8 +1351,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1430,8 +1373,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1458,8 +1399,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1532,8 +1472,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1560,8 +1498,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1583,8 +1520,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1601,8 +1536,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1655,8 +1589,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1683,8 +1615,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1706,8 +1637,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1734,8 +1663,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1808,8 +1736,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1836,8 +1762,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1859,8 +1784,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1877,8 +1800,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers3.json index 61ddaaa1ef51..46d5f603fc5e 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers3.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -245,8 +239,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -273,8 +265,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -296,8 +287,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -324,8 +313,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -398,8 +386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -426,8 +412,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -449,8 +434,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -477,8 +460,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -531,8 +513,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -559,8 +539,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -582,8 +561,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -610,8 +587,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -684,8 +660,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -712,8 +686,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -735,8 +708,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -763,8 +734,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -817,8 +787,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -845,8 +813,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -868,8 +835,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -896,8 +861,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -970,8 +934,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -998,8 +960,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1021,8 +982,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1049,8 +1008,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1133,8 +1091,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1161,8 +1117,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1184,8 +1139,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1212,8 +1165,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1286,8 +1238,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1314,8 +1264,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1337,8 +1286,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1365,8 +1312,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1419,8 +1365,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1447,8 +1391,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1470,8 +1413,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1498,8 +1439,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1572,8 +1512,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1600,8 +1538,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1623,8 +1560,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1651,8 +1586,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1705,8 +1639,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1733,8 +1665,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1756,8 +1687,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1784,8 +1713,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1858,8 +1786,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1886,8 +1812,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1909,8 +1834,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1937,8 +1860,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers5.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers5.json index 158585f8160c..ccb1d49e010e 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers5.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembers5.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -245,8 +239,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -273,8 +265,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -429,8 +420,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -457,8 +446,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -613,8 +601,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -641,8 +627,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -827,8 +812,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -855,8 +838,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1011,8 +993,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1039,8 +1019,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1195,8 +1174,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1223,8 +1200,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality.json index 5d8d28d4291a..ca4fee6b7517 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -310,8 +301,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -338,8 +327,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -412,8 +400,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -440,8 +426,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -494,8 +479,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -522,8 +505,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -596,8 +578,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -624,8 +604,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -678,8 +657,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -706,8 +683,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -780,8 +756,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -808,8 +782,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -875,8 +848,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -903,8 +874,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1149,8 +1119,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1177,8 +1145,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1251,8 +1218,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1279,8 +1244,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1333,8 +1297,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1361,8 +1323,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1435,8 +1396,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1463,8 +1422,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1517,8 +1475,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1545,8 +1501,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1619,8 +1574,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1647,8 +1600,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1714,8 +1666,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1742,8 +1692,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality2.json index 2a7d58d78972..b1edc09bb133 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -218,8 +212,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -246,8 +238,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -320,8 +311,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -348,8 +337,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -402,8 +390,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -430,8 +416,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -504,8 +489,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -532,8 +515,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -586,8 +568,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -614,8 +594,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -688,8 +667,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -716,8 +693,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -783,8 +759,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -811,8 +785,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -884,8 +857,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -912,8 +883,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality3.json index d2a72704732b..2d45ff141a0d 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality3.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -218,8 +212,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -246,8 +238,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -320,8 +311,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -348,8 +337,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -402,8 +390,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -430,8 +416,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -504,8 +489,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -532,8 +515,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -586,8 +568,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -614,8 +594,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -688,8 +667,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -716,8 +693,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -783,8 +759,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -811,8 +785,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -884,8 +857,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -912,8 +883,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality4.json index 38a6f97e5fe9..3182220d74c2 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithObjectMembersOptionality4.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -218,8 +212,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -246,8 +238,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -320,8 +311,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -348,8 +337,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -402,8 +390,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -430,8 +416,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -504,8 +489,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -532,8 +515,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -586,8 +568,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -614,8 +594,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -688,8 +667,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -716,8 +693,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -783,8 +759,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -811,8 +785,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -884,8 +857,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -912,8 +883,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json index 28e987ee2711..46e1ffb22c4f 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json @@ -142,8 +142,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +158,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer.json index b2f2a90fcac8..68fdf336785a 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer2.json index bf3e03f35433..a56c447d9f3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer3.json index 7931a347b8ef..45af89a2d3b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer3.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer4.json index 534e1207bb05..d58d0e5d2134 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer4.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json index ea2fa32ecd0f..bba9b770fe07 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json @@ -73,7 +73,6 @@ "end": 62, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit5.json b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit5.json index 88f91c9d5b19..ae5759409815 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit5.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit5.json @@ -41,7 +41,6 @@ "end": 93, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit6.json b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit6.json index bd71eeb85537..fa066cf7cb11 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit6.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit6.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit7.json b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit7.json index 93fb8e905753..3c5a401f3071 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit7.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolDeclarationEmit7.json @@ -85,8 +85,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -103,8 +101,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty10.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty10.json index 8b5a6a3a5c3c..517168ac4d99 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty10.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty10.json @@ -105,10 +105,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -130,10 +127,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -221,8 +215,6 @@ }, "computed": true, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,15 +250,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty11.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty11.json index 1d63f5b0ce82..7ca421be83f4 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty11.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty11.json @@ -98,8 +98,6 @@ }, "computed": true, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -135,15 +133,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty12.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty12.json index 0662dd20ded0..3a716874df7a 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty12.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty12.json @@ -105,10 +105,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -196,8 +193,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -233,15 +228,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty13.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty13.json index 9ae3d408588a..0d2fa0e8342f 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty13.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty13.json @@ -105,10 +105,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -130,10 +127,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -221,8 +215,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,15 +250,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty14.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty14.json index 53528061de6d..4f85ba701f73 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty14.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty14.json @@ -105,10 +105,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -130,10 +127,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -221,8 +215,6 @@ }, "computed": true, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,15 +250,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty15.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty15.json index 802f8990b598..2a134686c2bb 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty15.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty15.json @@ -98,8 +98,6 @@ }, "computed": true, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -135,15 +133,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty16.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty16.json index b2a20018d2cc..00ad75896123 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty16.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty16.json @@ -105,10 +105,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -196,8 +193,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -233,15 +228,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty17.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty17.json index a4d914f61e39..a923e10bc895 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty17.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty17.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -169,8 +166,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -187,8 +182,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty20.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty20.json index e74fffc7dd94..335fc42ec806 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty20.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty20.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -136,8 +134,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -146,7 +143,6 @@ "end": 120, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json index 2c54a8659f18..3e6946413642 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json @@ -127,8 +127,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -155,8 +153,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -196,8 +193,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -224,8 +219,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -438,8 +432,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -466,8 +458,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -489,8 +480,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -517,8 +506,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json index 1ac0b0ed4c78..688fe5635abc 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json @@ -96,7 +96,6 @@ "end": 70, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty23.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty23.json index 786aef639a80..2fc35f15715e 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty23.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty23.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -108,8 +106,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty24.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty24.json index ef408b69572d..7960bd1e6d59 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty24.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty24.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -108,8 +106,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty25.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty25.json index 09be85fa9d63..e1694163e296 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty25.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty25.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -108,8 +106,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty29.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty29.json index 70cbf462fefa..42b3b41f0a59 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty29.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty29.json @@ -222,8 +222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -240,8 +238,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty30.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty30.json index 287ee33ede94..158774e3a2fc 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty30.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty30.json @@ -222,8 +222,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -240,8 +238,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty31.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty31.json index 7d86b3da4d36..7cf73eceb948 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty31.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty31.json @@ -249,8 +249,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +265,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty32.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty32.json index dedc0d2c899a..d561a44829d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty32.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty32.json @@ -249,8 +249,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -267,8 +265,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty33.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty33.json index 48db09d964d8..aef22f89b1ad 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty33.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty33.json @@ -258,8 +258,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +274,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty34.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty34.json index 7f311a7ae770..615263b18388 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty34.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty34.json @@ -258,8 +258,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -276,8 +274,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty35.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty35.json index 7b784c7d95bb..c105ae74977f 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty35.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty35.json @@ -41,7 +41,6 @@ "end": 72, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -108,8 +107,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +123,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -172,7 +168,6 @@ "end": 131, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -239,8 +234,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -257,8 +250,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty37.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty37.json index 783d5f7f04d4..68a03a3c821c 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty37.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty37.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -131,8 +128,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -149,8 +144,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty38.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty38.json index 1c3d9d66a200..33cc80b561d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty38.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty38.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -162,8 +159,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -180,8 +175,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty41.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty41.json index 9fc7063e95c3..cbd8f0f0baa6 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty41.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty41.json @@ -153,8 +153,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -171,8 +169,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -321,8 +318,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -339,8 +334,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -362,8 +356,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -380,8 +372,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty58.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty58.json index 4f112d63e5a0..521d8bef6719 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty58.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty58.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty60.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty60.json index 10f7468c1acc..a434d4d54775 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty60.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty60.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -218,8 +215,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +231,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -404,8 +398,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -422,8 +414,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -532,8 +523,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -550,8 +539,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json index a68873b7c1ea..d95ad2e73f62 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json @@ -81,8 +81,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -99,8 +97,7 @@ }, "kind": "symbol" } - }, - "typeParams": null + } } ] } @@ -720,8 +717,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -760,7 +755,6 @@ "end": 455, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -881,8 +875,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty8.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty8.json index e3e9cb1a9654..3e4572e6d20a 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty8.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty8.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -100,7 +97,6 @@ "end": 91, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty9.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty9.json index ce780934d63a..d58578d94bec 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty9.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty9.json @@ -105,10 +105,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -130,10 +127,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } @@ -221,8 +215,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,15 +250,11 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolType16.json b/crates/swc_ecma_parser/tests/tsc/symbolType16.json index 0b21993af069..e20f0a945676 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolType16.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolType16.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolType17.json b/crates/swc_ecma_parser/tests/tsc/symbolType17.json index 64b2115ebeba..dae9886e4d83 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolType17.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolType17.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolType18.json b/crates/swc_ecma_parser/tests/tsc/symbolType18.json index 1772761890e9..b41e13616255 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolType18.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolType18.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json index f95a2d64ce05..d6e76e4cc541 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json @@ -6157,8 +6157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6175,8 +6173,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6198,8 +6195,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6216,8 +6211,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6270,8 +6264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6288,8 +6280,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6311,8 +6302,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6339,8 +6328,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6900,8 +6888,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6918,8 +6904,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json index 6fbf7a887f51..8edc4a5f7419 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json @@ -6157,8 +6157,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6175,8 +6173,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6198,8 +6195,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6216,8 +6211,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6270,8 +6264,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6288,8 +6280,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6311,8 +6302,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6339,8 +6328,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6900,8 +6888,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6918,8 +6904,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTags.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTags.json index 696d54c75bbc..6a99e5aa29d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTags.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTags.json @@ -178,8 +178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -206,8 +204,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -229,8 +226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -257,8 +252,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -280,8 +274,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -308,8 +300,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -318,7 +309,6 @@ "end": 148, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTagsES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTagsES6.json index 0df98ed78d12..1ffa5248afca 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTagsES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithIncompatibleTypedTagsES6.json @@ -178,8 +178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -206,8 +204,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -229,8 +226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -257,8 +252,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -280,8 +274,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -308,8 +300,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -318,7 +309,6 @@ "end": 164, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressions.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressions.json index 167d6b03c041..0768f31c7096 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressions.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressions.json @@ -178,8 +178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -336,8 +334,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.json index 8cf2e465e041..c52bbefad9cd 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithManyCallAndMemberExpressionsES6.json @@ -178,8 +178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -336,8 +334,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTags.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTags.json index a22526b1bc8f..8342970ac8c4 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTags.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTags.json @@ -178,8 +178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -206,8 +204,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -229,8 +226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -257,8 +252,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -280,8 +274,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -308,8 +300,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -318,7 +309,6 @@ "end": 147, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTagsES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTagsES6.json index 04f1465e537a..6da74d80b22b 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTagsES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithTypedTagsES6.json @@ -178,8 +178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -206,8 +204,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -229,8 +226,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -257,8 +252,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -280,8 +274,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -308,8 +300,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -318,7 +309,6 @@ "end": 163, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json index 1a3a10fb2865..b1e3945ba6ae 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json @@ -309,8 +309,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -327,8 +325,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -350,8 +347,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -368,8 +363,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -391,8 +385,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -409,8 +401,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -1661,8 +1652,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1877,8 +1866,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1905,15 +1892,13 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json index c5780e151e78..57fa50e4dd39 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json @@ -5133,8 +5133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5151,8 +5149,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json index 92c76bb806c8..efa2c91c5ad7 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json @@ -8236,8 +8236,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8254,8 +8252,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -8307,8 +8304,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8344,8 +8339,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8381,8 +8374,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8399,18 +8390,15 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -10123,8 +10111,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10183,8 +10169,7 @@ ] } } - }, - "typeParams": null + } } ] }, @@ -10216,8 +10201,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10276,8 +10259,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -10299,8 +10281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -10317,8 +10297,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -12803,8 +12782,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12821,8 +12798,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes4.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes4.json index 9d5f9ec2a0fb..4cb2d28290bf 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes4.json @@ -18914,8 +18914,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -18932,8 +18930,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -18955,8 +18952,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -19154,8 +19149,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -19843,8 +19837,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -19871,8 +19863,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -20381,7 +20372,6 @@ "end": 14127, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20563,8 +20553,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20591,8 +20579,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -20726,7 +20713,6 @@ "end": 14253, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -20916,8 +20902,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -20944,8 +20928,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -21098,7 +21081,6 @@ "end": 14391, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -21394,7 +21376,6 @@ "end": 14509, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -22039,8 +22020,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -22066,8 +22045,7 @@ "raw": "\"x\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -22089,8 +22067,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -22116,8 +22092,7 @@ "raw": "\"f64\"" } } - }, - "typeParams": null + } } ] } @@ -22158,8 +22133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -22185,8 +22158,7 @@ "raw": "\"y\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -22208,8 +22180,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -22235,8 +22205,7 @@ "raw": "\"f64\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json index fe789744ad4d..05bf86596f59 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes5.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -81,8 +79,7 @@ "raw": "\"A\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -104,8 +101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -131,8 +126,7 @@ "raw": "\"B\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json index e8c4644b4838..bf5fc9c614e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes6.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -108,13 +104,11 @@ }, "members": [] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -136,8 +130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -173,8 +165,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -191,13 +181,11 @@ }, "members": [] } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json index 3d11cae02c57..e78732630d19 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes7.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -81,8 +79,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -104,8 +101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -131,8 +126,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -154,8 +148,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -181,8 +173,7 @@ "raw": "'C'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -204,8 +195,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -231,8 +220,7 @@ "raw": "'D'" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json index afbf2d0e4b81..7e72c28943e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json @@ -5456,8 +5456,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5526,8 +5524,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisInObjectLiterals.json b/crates/swc_ecma_parser/tests/tsc/thisInObjectLiterals.json index 96865f5a9555..5c8158fcaff0 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisInObjectLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/thisInObjectLiterals.json @@ -295,8 +295,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -323,8 +321,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -346,8 +343,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -364,8 +359,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -568,8 +562,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -604,8 +596,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json b/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json index 79b391272306..b1a9cb7a8c9b 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json @@ -392,7 +392,6 @@ "end": 278, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -460,7 +459,6 @@ "end": 311, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -528,7 +526,6 @@ "end": 344, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeErrors.json b/crates/swc_ecma_parser/tests/tsc/thisTypeErrors.json index 7d68d4aa6aba..11e8142cf9aa 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeErrors.json @@ -115,8 +115,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -132,8 +130,7 @@ "ctxt": 0 } } - }, - "typeParams": null + } } ] } @@ -398,8 +395,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -435,8 +430,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -452,13 +445,11 @@ "ctxt": 0 } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -480,8 +471,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -525,8 +514,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -548,8 +536,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -593,8 +579,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -616,8 +601,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -690,8 +673,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -713,8 +695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -737,7 +717,6 @@ "end": 255, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -798,8 +777,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -877,8 +855,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -894,8 +870,7 @@ "ctxt": 0 } } - }, - "typeParams": null + } } ] } @@ -1195,7 +1170,6 @@ "end": 394, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessors.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessors.json index 2ea14cf45122..f2201c26f6ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessors.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessors.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessorsNegative.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessorsNegative.json index b9b2881759b7..921f2cb85258 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessorsNegative.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInAccessorsNegative.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -167,8 +161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -258,8 +250,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInBasePropertyAndDerivedContainerOfBase01.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInBasePropertyAndDerivedContainerOfBase01.json index ab20726a346e..497ddeacc125 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInBasePropertyAndDerivedContainerOfBase01.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInBasePropertyAndDerivedContainerOfBase01.json @@ -104,8 +104,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -132,8 +130,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -186,8 +183,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -203,8 +198,7 @@ "ctxt": 0 } } - }, - "typeParams": null + } } ] } @@ -277,8 +271,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -322,8 +314,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json index 1531795ec170..38e809a902b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json @@ -355,8 +355,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -383,8 +381,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -406,8 +403,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -423,8 +418,7 @@ "ctxt": 0 } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json index 93aa1af3e785..bf11fdeb4ee3 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json @@ -601,8 +601,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -619,8 +617,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1024,8 +1021,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1042,8 +1037,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -1052,7 +1046,6 @@ "end": 493, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1120,7 +1113,6 @@ "end": 532, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1188,7 +1180,6 @@ "end": 583, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1246,8 +1237,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1264,8 +1253,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1298,7 +1286,6 @@ "end": 623, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1376,7 +1363,6 @@ "end": 661, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1505,8 +1491,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1523,8 +1507,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1724,8 +1707,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1742,8 +1723,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3046,8 +3026,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3064,8 +3042,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3087,8 +3064,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3148,8 +3123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3166,8 +3139,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3220,8 +3192,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -3348,8 +3319,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3366,8 +3335,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3389,8 +3357,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3453,8 +3419,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -4267,8 +4232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4285,8 +4248,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -4295,7 +4257,6 @@ "end": 2094, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4400,7 +4361,6 @@ "end": 2199, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4518,8 +4478,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4579,8 +4537,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4597,8 +4553,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4651,8 +4606,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -4661,7 +4615,6 @@ "end": 2313, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5261,8 +5214,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5279,8 +5230,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5494,8 +5444,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5512,8 +5460,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5667,8 +5614,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5685,8 +5630,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6268,8 +6212,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6286,8 +6228,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6441,8 +6382,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6459,8 +6398,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -6746,8 +6684,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6764,8 +6700,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7240,8 +7175,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7258,8 +7191,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -11076,8 +11008,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -11094,8 +11024,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -11588,7 +11517,6 @@ "end": 6045, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions2.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions2.json index 6ca48beb68f6..46aa9b0506ca 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions2.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -117,8 +115,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -140,8 +137,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -204,8 +199,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -490,8 +484,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -526,8 +518,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -549,8 +540,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -585,8 +574,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsIndexSignature", @@ -682,7 +670,6 @@ "end": 549, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -734,7 +721,6 @@ "end": 568, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions4.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions4.json index d6e26acc96a4..e070bfc2cb8c 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions4.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions4.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -124,8 +121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +137,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json index 6feb6de13ef9..fe366ce3e7f1 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ "ctxt": 0 } } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -81,7 +78,6 @@ "end": 50, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -415,8 +411,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -443,8 +437,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -466,8 +459,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -483,8 +474,7 @@ "ctxt": 0 } } - }, - "typeParams": null + } } ] } @@ -537,8 +527,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -562,8 +550,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -585,8 +572,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -638,8 +623,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -661,8 +645,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -707,8 +689,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -730,8 +711,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -776,8 +755,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -799,8 +777,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -840,8 +816,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -863,8 +838,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -925,8 +898,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -948,8 +920,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1011,8 +981,7 @@ }, "isAbstract": false } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1034,8 +1003,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1079,8 +1046,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1102,8 +1068,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1191,8 +1155,7 @@ ] } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1214,8 +1177,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1304,8 +1265,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals.json index 097da36aa520..0f8488aa6fef 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals.json @@ -913,8 +913,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -931,8 +929,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -941,7 +938,6 @@ "end": 569, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -981,7 +977,6 @@ "end": 605, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1049,7 +1044,6 @@ "end": 634, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json index d883922e68a0..c38d482507a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json @@ -529,8 +529,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -547,8 +545,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -570,8 +567,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -588,8 +583,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -611,8 +605,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -629,8 +621,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -639,7 +630,6 @@ "end": 656, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3671,8 +3661,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3699,8 +3687,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3722,8 +3709,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3836,8 +3821,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4629,8 +4613,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4657,8 +4639,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4680,8 +4661,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4708,8 +4687,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -5396,8 +5374,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5424,8 +5400,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -5434,7 +5409,6 @@ "end": 3042, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5484,7 +5458,6 @@ "end": 3068, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8086,7 +8059,6 @@ "end": 4028, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8136,7 +8108,6 @@ "end": 4054, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8438,8 +8409,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8521,8 +8490,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8544,8 +8512,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8572,8 +8538,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -8595,8 +8560,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8651,8 +8614,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInTuples.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInTuples.json index b58fbc9aec3e..d238eaa5a3a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInTuples.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInTuples.json @@ -73,7 +73,6 @@ "end": 40, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeSyntacticContext.json b/crates/swc_ecma_parser/tests/tsc/thisTypeSyntacticContext.json index 58cefffbd6cf..e29653a37fea 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeSyntacticContext.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeSyntacticContext.json @@ -72,8 +72,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -180,8 +177,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -198,8 +193,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -221,8 +215,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -282,8 +274,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -300,8 +290,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -327,8 +316,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/throwStatements.json b/crates/swc_ecma_parser/tests/tsc/throwStatements.json index a362a603bda3..ad6efd5d867a 100644 --- a/crates/swc_ecma_parser/tests/tsc/throwStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/throwStatements.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescript.json b/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescript.json index 0243e3c8250f..b9430fc242cb 100644 --- a/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescript.json +++ b/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescript.json @@ -129,8 +129,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +145,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescriptComments1.json b/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescriptComments1.json index cd7aa33ec7ec..8c37515441ee 100644 --- a/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescriptComments1.json +++ b/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescriptComments1.json @@ -129,8 +129,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +145,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescriptComments2.json b/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescriptComments2.json index 1d86ae5e651c..c9dda2b61dac 100644 --- a/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescriptComments2.json +++ b/crates/swc_ecma_parser/tests/tsc/tsNoCheckForTypescriptComments2.json @@ -129,8 +129,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -147,8 +145,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName.json b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName.json index 84a0f2778c3e..f5a07f88fbc5 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName.json +++ b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -114,8 +112,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -200,8 +197,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -228,8 +223,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -337,8 +331,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -365,8 +357,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -474,8 +465,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -502,8 +491,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -615,8 +603,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -643,8 +629,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -729,8 +714,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -757,8 +740,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -866,8 +848,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -894,8 +874,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1003,8 +982,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1031,8 +1008,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1170,8 +1146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1198,8 +1172,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1337,8 +1310,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1365,8 +1336,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1511,8 +1481,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1539,8 +1507,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1686,8 +1653,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1714,8 +1679,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName2.json b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName2.json index c9d25f01b24e..9e0a79b31ea1 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName2.json +++ b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName2.json @@ -109,8 +109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -137,8 +135,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -246,8 +243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -274,8 +269,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -410,8 +404,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -438,8 +430,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -547,8 +538,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -575,8 +564,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -714,8 +702,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -742,8 +728,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -881,8 +866,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -909,8 +892,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1055,8 +1037,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1083,8 +1063,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1230,8 +1209,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1258,8 +1235,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithDifferentConstraints.json b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithDifferentConstraints.json index 614c28f4e4ad..85506d0bcf48 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithDifferentConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithDifferentConstraints.json @@ -104,8 +104,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -132,8 +130,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -236,8 +233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -264,8 +259,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -423,8 +417,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -451,8 +443,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -573,8 +564,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -601,8 +590,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -735,8 +723,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -763,8 +749,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -897,8 +882,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -925,8 +908,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1066,8 +1048,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1094,8 +1074,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1236,8 +1215,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1264,8 +1241,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1362,8 +1338,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1390,8 +1364,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1413,8 +1386,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1469,8 +1440,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -1555,8 +1525,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1583,8 +1551,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1606,8 +1573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1662,8 +1627,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -1748,8 +1712,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1776,8 +1738,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1870,8 +1831,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1898,8 +1857,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithTheSameNameButDifferentArity.json b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithTheSameNameButDifferentArity.json index dd4e07916ca5..20273f1d2a7e 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithTheSameNameButDifferentArity.json +++ b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithTheSameNameButDifferentArity.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -114,8 +112,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -223,8 +220,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -251,8 +246,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -364,8 +358,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -392,8 +384,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -501,8 +492,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -529,8 +518,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -645,8 +633,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -673,8 +659,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -812,8 +797,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -840,8 +823,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -963,8 +945,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -991,8 +971,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1138,8 +1117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1166,8 +1143,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule.json b/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule.json index 01d84d5403f2..36bc3e4149ab 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule.json +++ b/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -200,8 +197,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -228,8 +223,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -320,8 +314,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -338,8 +330,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -611,8 +602,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -639,8 +628,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule2.json b/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule2.json index 93d9ce803a23..47639d2cbcf2 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule2.json +++ b/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule2.json @@ -88,8 +88,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -106,8 +104,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -200,8 +197,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -228,8 +223,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -317,8 +311,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -335,8 +327,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -608,8 +599,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -636,8 +625,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json index 6ef67e030014..2b07e8f935c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json @@ -41,7 +41,6 @@ "end": 104, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -109,7 +108,6 @@ "end": 132, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -208,7 +206,6 @@ "end": 173, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -359,7 +356,6 @@ "end": 216, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -437,7 +433,6 @@ "end": 244, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -568,7 +563,6 @@ "end": 285, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -656,7 +650,6 @@ "end": 311, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -980,7 +973,6 @@ "end": 444, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1095,7 +1087,6 @@ "end": 483, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1276,7 +1267,6 @@ "end": 533, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1725,8 +1715,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1753,8 +1741,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1776,8 +1763,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1804,8 +1789,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -1814,7 +1798,6 @@ "end": 709, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2057,7 +2040,6 @@ "end": 759, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeAliases.json b/crates/swc_ecma_parser/tests/tsc/typeAliases.json index a07f029a6092..40385505a5a4 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeAliases.json +++ b/crates/swc_ecma_parser/tests/tsc/typeAliases.json @@ -739,8 +739,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -757,8 +755,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1544,8 +1541,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1562,8 +1557,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1629,8 +1623,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1647,8 +1639,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1959,8 +1950,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1977,8 +1966,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeAliasesForObjectTypes.json b/crates/swc_ecma_parser/tests/tsc/typeAliasesForObjectTypes.json index ced1dbcccbe5..11c86312d064 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeAliasesForObjectTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/typeAliasesForObjectTypes.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -145,8 +142,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -163,8 +158,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -308,8 +302,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -326,8 +318,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -379,8 +370,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -397,8 +386,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -482,8 +470,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -510,8 +496,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json index 0e0d0512558b..a3b427d2c247 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json @@ -5874,8 +5874,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5892,8 +5890,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5915,8 +5912,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5933,8 +5928,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6006,8 +6000,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6024,8 +6016,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6047,8 +6038,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6065,8 +6054,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6125,8 +6113,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6143,8 +6129,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6166,8 +6151,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6184,8 +6167,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6238,8 +6220,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6256,8 +6236,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6279,8 +6258,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6307,8 +6284,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7059,8 +7035,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7077,8 +7051,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json index 899cc1566bc9..3beefc4b59fd 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json @@ -6999,8 +6999,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7017,8 +7015,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7040,8 +7037,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7058,8 +7053,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -7131,8 +7125,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7149,8 +7141,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7172,8 +7163,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7190,8 +7179,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -7250,8 +7238,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7268,8 +7254,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7291,8 +7276,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7309,8 +7292,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -7363,8 +7345,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7381,8 +7361,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7404,8 +7383,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7432,8 +7409,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -8164,8 +8140,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -8182,8 +8156,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json index d2b11e059a49..a90760cca2a9 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json @@ -6635,8 +6635,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6653,8 +6651,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6676,8 +6673,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6694,8 +6689,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6767,8 +6761,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6785,8 +6777,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6808,8 +6799,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6826,8 +6815,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6886,8 +6874,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6904,8 +6890,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6927,8 +6912,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6945,8 +6928,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6999,8 +6981,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7017,8 +6997,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7040,8 +7019,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7068,8 +7045,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -7800,8 +7776,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7818,8 +7792,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json index f2cd6dd20551..a18860fdd076 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json @@ -73,7 +73,6 @@ "end": 39, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -123,7 +122,6 @@ "end": 60, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -811,8 +809,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -895,8 +891,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -918,8 +913,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -964,8 +957,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeAssertionsWithIntersectionTypes01.json b/crates/swc_ecma_parser/tests/tsc/typeAssertionsWithIntersectionTypes01.json index a68b951e4adf..5a8c927a6ceb 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeAssertionsWithIntersectionTypes01.json +++ b/crates/swc_ecma_parser/tests/tsc/typeAssertionsWithIntersectionTypes01.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -218,8 +212,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -236,8 +228,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeAssertionsWithUnionTypes01.json b/crates/swc_ecma_parser/tests/tsc/typeAssertionsWithUnionTypes01.json index 0f2c867089f7..aadd0787248a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeAssertionsWithUnionTypes01.json +++ b/crates/swc_ecma_parser/tests/tsc/typeAssertionsWithUnionTypes01.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromPrivatePropertyAssignment.json b/crates/swc_ecma_parser/tests/tsc/typeFromPrivatePropertyAssignment.json index e471072ca1b0..fb36e1e80d64 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromPrivatePropertyAssignment.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromPrivatePropertyAssignment.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment30.json b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment30.json index 467ce7da2afc..bfe7d94a8874 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment30.json +++ b/crates/swc_ecma_parser/tests/tsc/typeFromPropertyAssignment30.json @@ -81,8 +81,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -156,8 +154,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardFunction.json b/crates/swc_ecma_parser/tests/tsc/typeGuardFunction.json index c05a031cb9c0..97e9bc8bca6e 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardFunction.json @@ -1566,7 +1566,6 @@ "end": 809, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThis.json b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThis.json index ad8e37c3f15b..b359baa3768a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThis.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThis.json @@ -2118,8 +2118,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2136,8 +2134,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -2190,8 +2187,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2208,8 +2203,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -2294,8 +2288,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2322,8 +2314,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2345,8 +2336,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2363,8 +2352,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -2373,7 +2361,6 @@ "end": 1582, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2476,7 +2463,6 @@ "end": 1625, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3969,7 +3955,6 @@ "end": 2436, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4044,7 +4029,6 @@ "end": 2477, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardIntersectionTypes.json b/crates/swc_ecma_parser/tests/tsc/typeGuardIntersectionTypes.json index 882867478295..a70bb991cadc 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardIntersectionTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardIntersectionTypes.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -198,8 +192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +208,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1014,8 +1005,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1032,8 +1021,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1086,8 +1074,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1104,8 +1090,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1669,8 +1654,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1687,8 +1670,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1710,8 +1692,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1728,8 +1708,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1782,8 +1761,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1800,8 +1777,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1854,8 +1830,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1872,8 +1846,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsPrimitiveIntersection.json b/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsPrimitiveIntersection.json index b5e515dd28e6..d452845c6638 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsPrimitiveIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardNarrowsPrimitiveIntersection.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormInstanceOfOnInterface.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormInstanceOfOnInterface.json index 1a97830102c2..8b45fcd42f1c 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormInstanceOfOnInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormInstanceOfOnInterface.json @@ -91,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -119,8 +117,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -142,8 +139,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +155,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -251,8 +245,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -279,8 +271,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -302,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -320,8 +309,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -394,8 +382,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -422,8 +408,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -445,8 +430,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -463,8 +446,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsTypeOnInterfaces.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsTypeOnInterfaces.json index e7c54939f580..bc8b9dde77f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsTypeOnInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormIsTypeOnInterfaces.json @@ -91,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -119,8 +117,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -142,8 +139,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +155,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -251,8 +245,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -279,8 +271,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -302,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -320,8 +309,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -394,8 +382,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -422,8 +408,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -445,8 +430,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -463,8 +446,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json index cb9492d7a8ca..eb8b5fa676ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json @@ -702,8 +702,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -720,8 +718,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1283,8 +1280,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1301,8 +1296,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1544,8 +1538,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1562,8 +1554,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1595,8 +1586,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1613,8 +1602,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfPrimitiveSubtype.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfPrimitiveSubtype.json index 29095ed0d028..e45dd3f2876e 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfPrimitiveSubtype.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfPrimitiveSubtype.json @@ -103,7 +103,6 @@ "end": 38, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFromPropNameInUnionType.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFromPropNameInUnionType.json index feb06f111358..41921f31fcd3 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFromPropNameInUnionType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFromPropNameInUnionType.json @@ -1082,8 +1082,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1100,8 +1098,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1133,8 +1130,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1151,8 +1146,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json index 828e6498c67f..0ed2e83dbc2c 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json @@ -246,8 +246,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -264,8 +262,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -358,8 +355,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -386,8 +381,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsInProperties.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsInProperties.json index 974aa6744813..9e62227ef2d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsInProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsInProperties.json @@ -1103,8 +1103,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1140,8 +1138,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsOnClassProperty.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsOnClassProperty.json index 26b14890f763..88b0c75e5edc 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsOnClassProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsOnClassProperty.json @@ -598,8 +598,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -635,8 +633,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -658,8 +655,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -695,8 +690,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOf.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOf.json index 588c61ae51ec..b099a8847226 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOf.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOf.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -388,7 +385,6 @@ "end": 281, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -524,7 +520,6 @@ "end": 353, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json index cb1ec64a8d2b..1ce40a108fed 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json @@ -122,8 +122,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -140,8 +138,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -780,8 +777,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -808,8 +803,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1653,8 +1647,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1671,8 +1663,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1694,8 +1685,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1712,8 +1701,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1735,8 +1723,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1753,8 +1739,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1807,8 +1792,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1825,8 +1808,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1848,8 +1830,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1866,8 +1846,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1889,8 +1868,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1907,8 +1884,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2505,8 +2481,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2523,8 +2497,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3128,8 +3101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3146,8 +3117,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3169,8 +3139,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3187,8 +3155,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3241,8 +3208,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3259,8 +3224,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3282,8 +3246,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3300,8 +3262,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3920,8 +3881,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3938,8 +3897,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3961,8 +3919,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3979,8 +3935,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4459,8 +4414,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4487,8 +4440,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsConstructSignatureDeclaration", @@ -4578,8 +4530,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4596,8 +4546,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4650,8 +4599,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4668,8 +4615,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -5158,8 +5104,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5176,8 +5120,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsConstructSignatureDeclaration", @@ -5267,8 +5210,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5285,8 +5226,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfBySymbolHasInstance.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfBySymbolHasInstance.json index dcef04854c04..f94f69f58620 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfBySymbolHasInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfBySymbolHasInstance.json @@ -78,7 +78,6 @@ "end": 111, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -245,8 +244,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -263,8 +260,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -827,7 +823,6 @@ "end": 487, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -1044,8 +1039,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1072,8 +1065,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1873,7 +1865,6 @@ "end": 980, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -2069,8 +2060,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2087,8 +2076,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2110,8 +2098,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2128,8 +2114,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2151,8 +2136,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2169,8 +2152,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2223,8 +2205,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2241,8 +2221,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2264,8 +2243,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2282,8 +2259,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2305,8 +2281,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2323,8 +2297,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2921,8 +2894,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2939,8 +2910,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3030,7 +3000,6 @@ "end": 1501, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -3623,7 +3592,6 @@ "end": 1829, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -3819,8 +3787,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3837,8 +3803,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3860,8 +3825,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3878,8 +3841,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -3932,8 +3894,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3950,8 +3910,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3973,8 +3932,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3991,8 +3948,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4567,7 +4523,6 @@ "end": 2305, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -4724,8 +4679,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4742,8 +4695,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4765,8 +4717,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4783,8 +4733,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5263,8 +5212,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5291,8 +5238,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsConstructSignatureDeclaration", @@ -5338,7 +5284,6 @@ "end": 2818, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -5505,8 +5450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5523,8 +5466,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -5577,8 +5519,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5595,8 +5535,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -6085,8 +6024,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6103,8 +6040,7 @@ }, "kind": "any" } - }, - "typeParams": null + } }, { "type": "TsConstructSignatureDeclaration", @@ -6150,7 +6086,6 @@ "end": 3425, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -6317,8 +6252,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6335,8 +6268,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.json index fef1685af1bf..25c61371e680 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInstanceMemberNarrowedWithLoopAntecedent.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -88,8 +86,7 @@ "raw": "\"numberVariant\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -111,8 +108,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -129,8 +124,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -162,8 +156,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -189,8 +181,7 @@ "raw": "\"stringVariant\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -212,8 +203,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -230,8 +219,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json index 303efca4b23a..6496b97edc4e 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json @@ -606,8 +606,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -681,8 +679,7 @@ ] } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json index 3e759208a6a1..e8468d6bfc09 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json @@ -456,8 +456,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -474,8 +472,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -548,8 +545,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -566,8 +561,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1139,8 +1133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1167,8 +1159,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json index 560f792600c3..2610d874a89d 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json @@ -428,8 +428,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -446,8 +444,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -812,8 +809,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -840,8 +835,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json index 81b9fe403400..6f751dd4c847 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json index 0a92179db9a0..85d63e5d2e55 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -146,8 +143,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -238,8 +232,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -256,8 +248,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersWithIntersection.json b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersWithIntersection.json index 23540aa2013b..023882dc31c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersWithIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiersWithIntersection.json @@ -80,8 +80,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -98,8 +96,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -136,8 +133,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -164,8 +159,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -244,8 +238,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -272,8 +264,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -367,8 +358,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -385,8 +374,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -603,8 +591,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -630,8 +616,7 @@ "raw": "\"foo\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json index a25f93a97a10..e1275e2cc84e 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json @@ -132,8 +132,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +158,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -183,8 +180,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -211,8 +206,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -234,8 +228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -262,8 +254,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -272,7 +263,6 @@ "end": 506, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -532,8 +522,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -560,8 +548,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -583,8 +570,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -611,8 +596,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -634,8 +618,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -662,8 +644,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -672,7 +653,6 @@ "end": 594, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json index ca74fe97caf7..47a5e5363b6c 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json @@ -611,8 +611,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -639,8 +637,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -662,8 +659,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -690,8 +685,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -713,8 +707,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -741,8 +733,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -751,7 +742,6 @@ "end": 348, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json index 63ee5e7d6bee..f8d423492974 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json @@ -4234,7 +4234,6 @@ "end": 1400, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4296,7 +4295,6 @@ "end": 1416, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4358,7 +4356,6 @@ "end": 1459, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4489,7 +4486,6 @@ "end": 1484, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4620,7 +4616,6 @@ "end": 1550, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4714,7 +4709,6 @@ "end": 1569, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4808,7 +4802,6 @@ "end": 1648, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4920,7 +4913,6 @@ "end": 1680, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5113,7 +5105,6 @@ "end": 1776, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5175,7 +5166,6 @@ "end": 1792, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5237,7 +5227,6 @@ "end": 1835, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5368,7 +5357,6 @@ "end": 1860, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5499,7 +5487,6 @@ "end": 1926, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -5593,7 +5580,6 @@ "end": 1945, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typePredicateASI.json b/crates/swc_ecma_parser/tests/tsc/typePredicateASI.json index debfcdaa4724..dd043ce1b206 100644 --- a/crates/swc_ecma_parser/tests/tsc/typePredicateASI.json +++ b/crates/swc_ecma_parser/tests/tsc/typePredicateASI.json @@ -41,7 +41,6 @@ "end": 61, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -192,7 +191,6 @@ "end": 80, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeQueryWithReservedWords.json b/crates/swc_ecma_parser/tests/tsc/typeQueryWithReservedWords.json index d2a449affe6d..04cb92692cef 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeQueryWithReservedWords.json +++ b/crates/swc_ecma_parser/tests/tsc/typeQueryWithReservedWords.json @@ -219,8 +219,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -273,8 +271,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -296,8 +293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -350,8 +345,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -373,8 +367,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -427,8 +419,7 @@ }, "typeArguments": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping2.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping2.json index dbe4e4fba00b..c2a8f05560d2 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_contextualTyping2.json @@ -62,7 +62,6 @@ "end": 48, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -323,7 +322,6 @@ "end": 175, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -540,7 +538,6 @@ "end": 309, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_ensureInterfaceImpl.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_ensureInterfaceImpl.json index bdb4c438f302..ac86358dc6e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_ensureInterfaceImpl.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_ensureInterfaceImpl.json @@ -40,7 +40,6 @@ "end": 51, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_optionalMemberConformance.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_optionalMemberConformance.json index 11ddf2718fb6..e54f1201829a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_optionalMemberConformance.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_optionalMemberConformance.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -94,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -112,8 +107,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance1.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance1.json index 24d6123f22e9..f47636c1eccf 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance1.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance1.json @@ -247,8 +247,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -265,8 +263,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance2.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance2.json index 8231daf91140..27ca81e0d604 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance2.json @@ -247,8 +247,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -265,8 +263,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance3.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance3.json index 5002238a019f..b55aee1314ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_propertyValueConformance3.json @@ -60,8 +60,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -78,8 +76,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -101,8 +98,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -119,8 +114,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -142,8 +136,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -160,8 +152,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_vacuousIntersectionOfContextualTypes.json b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_vacuousIntersectionOfContextualTypes.json index e79a28f1fd88..87ee23efd53a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_vacuousIntersectionOfContextualTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/typeSatisfaction_vacuousIntersectionOfContextualTypes.json @@ -188,8 +188,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -215,8 +213,7 @@ "raw": "\"baz\"" } } - }, - "typeParams": null + } } ] } @@ -290,8 +287,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -345,8 +340,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typedefCrossModule.json b/crates/swc_ecma_parser/tests/tsc/typedefCrossModule.json index c01d3b26d98c..6d31655f3f11 100644 --- a/crates/swc_ecma_parser/tests/tsc/typedefCrossModule.json +++ b/crates/swc_ecma_parser/tests/tsc/typedefCrossModule.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typedefMultipleTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/typedefMultipleTypeParameters.json index 08a29b3c2821..e3422726e054 100644 --- a/crates/swc_ecma_parser/tests/tsc/typedefMultipleTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/typedefMultipleTypeParameters.json @@ -191,8 +191,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -209,8 +207,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -251,8 +248,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -278,8 +273,7 @@ "raw": "1" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -301,8 +295,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -328,8 +320,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/typeofANonExportedType.json b/crates/swc_ecma_parser/tests/tsc/typeofANonExportedType.json index 7c792eba153b..bf60a46681c0 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofANonExportedType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofANonExportedType.json @@ -694,8 +694,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -712,8 +710,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeofAnExportedType.json b/crates/swc_ecma_parser/tests/tsc/typeofAnExportedType.json index 4b7999287c9f..8a3c02b9fed1 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofAnExportedType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofAnExportedType.json @@ -725,8 +725,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -743,8 +741,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typeofThis.json b/crates/swc_ecma_parser/tests/tsc/typeofThis.json index 091e605f6ce3..e1af8d7e137f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofThis.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofThis.json @@ -909,8 +909,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -927,8 +925,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1112,8 +1109,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1130,8 +1125,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -2987,8 +2981,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3005,8 +2997,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -3674,8 +3665,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3692,8 +3681,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/types.asyncGenerators.es2018.1.json b/crates/swc_ecma_parser/tests/tsc/types.asyncGenerators.es2018.1.json index 27b58307a3dc..c579732e7578 100644 --- a/crates/swc_ecma_parser/tests/tsc/types.asyncGenerators.es2018.1.json +++ b/crates/swc_ecma_parser/tests/tsc/types.asyncGenerators.es2018.1.json @@ -5982,7 +5982,6 @@ "end": 3955, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typesOnlyExternalModuleStillHasInstance.json b/crates/swc_ecma_parser/tests/tsc/typesOnlyExternalModuleStillHasInstance.json index 661d246d8a94..2fb768e47c86 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesOnlyExternalModuleStillHasInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/typesOnlyExternalModuleStillHasInstance.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,8 +77,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -102,8 +99,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -120,8 +115,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -216,8 +210,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -244,8 +236,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -421,8 +412,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -449,8 +438,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/typesWithOptionalProperty.json b/crates/swc_ecma_parser/tests/tsc/typesWithOptionalProperty.json index 632fd8828fb8..468c1512d5a4 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesWithOptionalProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/typesWithOptionalProperty.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -123,7 +117,6 @@ "end": 123, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -220,8 +213,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -238,8 +229,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -261,8 +251,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -279,8 +267,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -289,7 +276,6 @@ "end": 191, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedCallSignatures.json index d356a3f06771..cb09762b5027 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/typesWithSpecializedCallSignatures.json @@ -761,7 +761,6 @@ "end": 364, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -848,7 +847,6 @@ "end": 393, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -935,7 +933,6 @@ "end": 419, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1116,7 +1113,6 @@ "end": 469, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1203,7 +1199,6 @@ "end": 498, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1290,7 +1285,6 @@ "end": 524, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json index 286165b04e51..8dcd3e539f13 100644 --- a/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json @@ -185,8 +185,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -203,8 +201,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1341,8 +1338,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1359,8 +1354,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/undefinedIsSubtypeOfEverything.json b/crates/swc_ecma_parser/tests/tsc/undefinedIsSubtypeOfEverything.json index 1737452df3d0..cdc67b4d02b4 100644 --- a/crates/swc_ecma_parser/tests/tsc/undefinedIsSubtypeOfEverything.json +++ b/crates/swc_ecma_parser/tests/tsc/undefinedIsSubtypeOfEverything.json @@ -1120,8 +1120,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1138,8 +1136,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1309,8 +1306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1327,8 +1322,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json index 25da0d71564b..37dc159aa321 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -82,8 +80,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -2357,8 +2354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2375,8 +2370,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -2429,8 +2423,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2447,8 +2439,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -2501,8 +2492,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2519,8 +2508,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -2970,8 +2958,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2997,8 +2983,7 @@ "raw": "'test'" } } - }, - "typeParams": null + } } ] } @@ -4396,8 +4381,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4414,8 +4397,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json index a2be218ac1d8..180e7a07aff6 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json @@ -435,8 +435,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -453,8 +451,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -847,8 +844,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -865,8 +860,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1024,8 +1018,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1042,8 +1034,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -1125,8 +1116,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1143,8 +1132,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1252,8 +1240,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1270,8 +1256,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1371,8 +1356,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1389,8 +1372,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1431,8 +1413,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1449,8 +1429,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json index b31fd09f1689..7a7f32ec660f 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json @@ -1308,7 +1308,6 @@ "end": 456, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1449,7 +1448,6 @@ "end": 522, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2242,7 +2240,6 @@ "end": 702, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2382,7 +2379,6 @@ "end": 765, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3596,8 +3592,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3614,8 +3608,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -4514,8 +4507,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4532,8 +4523,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -4966,8 +4956,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4984,8 +4972,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -5206,8 +5193,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5234,8 +5219,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, @@ -5267,8 +5251,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5295,8 +5277,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json b/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json index 3e8e972b98a8..cd8d0b9f49c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json +++ b/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json @@ -170,8 +170,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -207,8 +205,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -230,8 +227,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -277,8 +272,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -387,8 +381,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -424,8 +416,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -447,8 +438,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -494,8 +483,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -604,8 +592,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -641,8 +627,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -664,8 +649,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -711,8 +694,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -821,8 +803,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -858,8 +838,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -881,8 +860,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -928,8 +905,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1048,8 +1024,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1085,8 +1059,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1108,8 +1081,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1155,8 +1126,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1275,8 +1245,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1312,8 +1280,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1335,8 +1302,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1382,8 +1347,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1482,8 +1446,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1500,8 +1462,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1534,8 +1495,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1571,8 +1530,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1594,8 +1552,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1641,8 +1597,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1759,8 +1714,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1796,8 +1749,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1819,8 +1771,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1866,8 +1816,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -1986,8 +1935,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2023,8 +1970,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2046,8 +1992,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2093,8 +2037,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2285,8 +2228,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2322,8 +2263,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2345,8 +2285,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2392,8 +2330,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2644,8 +2581,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2681,8 +2616,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2704,8 +2638,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2751,8 +2683,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2891,8 +2822,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2928,8 +2857,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2951,8 +2879,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2998,8 +2924,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3206,8 +3131,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3243,8 +3166,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3266,8 +3188,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3313,8 +3233,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3474,8 +3393,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3511,8 +3428,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3534,8 +3450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3581,8 +3495,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -3815,8 +3728,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3852,8 +3763,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3875,8 +3785,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3922,8 +3830,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4194,8 +4101,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4231,8 +4136,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4254,8 +4158,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4301,8 +4203,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4453,8 +4354,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4490,8 +4389,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4513,8 +4411,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4560,8 +4456,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4680,8 +4575,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4717,8 +4610,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4740,8 +4632,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4787,8 +4677,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -4897,8 +4786,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4934,8 +4821,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4957,8 +4843,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5004,8 +4888,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionThisTypeInFunctions.json b/crates/swc_ecma_parser/tests/tsc/unionThisTypeInFunctions.json index a551f3085460..6808bff375d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionThisTypeInFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/unionThisTypeInFunctions.json @@ -41,7 +41,6 @@ "end": 58, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -148,8 +147,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -166,8 +163,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -207,7 +203,6 @@ "end": 136, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -314,8 +309,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -332,8 +325,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures6.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures6.json index c3a29893f786..71eeb3fd878f 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures6.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -124,8 +121,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +137,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -195,8 +189,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -213,8 +205,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -266,8 +257,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -284,8 +273,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1329,8 +1317,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1386,8 +1372,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1409,8 +1394,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1466,8 +1449,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1489,8 +1471,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1546,8 +1526,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1569,8 +1548,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1626,8 +1603,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1649,8 +1625,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1706,8 +1680,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -2057,8 +2030,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2114,8 +2085,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeFromArrayLiteral.json b/crates/swc_ecma_parser/tests/tsc/unionTypeFromArrayLiteral.json index f77b86f58e90..438e4acebfcc 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeFromArrayLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeFromArrayLiteral.json @@ -498,8 +498,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -516,8 +514,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -539,8 +536,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -557,8 +552,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json b/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json index c7d2a0c298b1..558377f0a064 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json @@ -2096,7 +2096,6 @@ "end": 912, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2465,7 +2464,6 @@ "end": 992, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3733,8 +3731,6 @@ }, "computed": true, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3759,8 +3755,7 @@ "value": true } } - }, - "typeParams": null + } } ] }, @@ -5064,8 +5059,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5101,8 +5094,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json b/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json index de713ab3ca7f..468aa9bc7cd8 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json @@ -73,7 +73,6 @@ "end": 59, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -154,8 +153,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -172,8 +169,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -182,7 +178,6 @@ "end": 151, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -250,7 +245,6 @@ "end": 207, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -331,8 +325,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -349,8 +341,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -359,7 +350,6 @@ "end": 292, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -447,7 +437,6 @@ "end": 342, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -567,7 +556,6 @@ "end": 382, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -648,8 +636,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -666,8 +652,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -739,7 +724,6 @@ "end": 474, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -820,8 +804,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -838,8 +820,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -848,7 +829,6 @@ "end": 566, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -916,7 +896,6 @@ "end": 622, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -997,8 +976,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1015,8 +992,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -1025,7 +1001,6 @@ "end": 707, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1113,7 +1088,6 @@ "end": 757, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1233,7 +1207,6 @@ "end": 797, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1314,8 +1287,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1332,8 +1303,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeReadonly.json b/crates/swc_ecma_parser/tests/tsc/unionTypeReadonly.json index e4c6f717c38b..5d4786820905 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeReadonly.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeReadonly.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -126,8 +123,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -144,8 +139,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -198,8 +192,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -216,8 +208,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -270,8 +261,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -288,8 +277,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -342,8 +330,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -360,8 +346,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeReduction2.json b/crates/swc_ecma_parser/tests/tsc/unionTypeReduction2.json index 1582d5007ffc..a836eb2f853a 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeReduction2.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeReduction2.json @@ -59,7 +59,6 @@ "end": 45, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -136,7 +135,6 @@ "end": 73, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -470,7 +468,6 @@ "end": 214, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -594,7 +591,6 @@ "end": 242, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2384,7 +2380,6 @@ "end": 989, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2454,7 +2449,6 @@ "end": 1028, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2522,7 +2516,6 @@ "end": 1043, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2914,7 +2907,6 @@ "end": 1210, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3163,7 +3155,6 @@ "end": 1338, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeWithIndexSignature.json b/crates/swc_ecma_parser/tests/tsc/unionTypeWithIndexSignature.json index 878c80b62b58..783ffb5c3373 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeWithIndexSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeWithIndexSignature.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -98,8 +96,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -124,13 +120,11 @@ "value": true } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -152,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -178,8 +170,7 @@ "value": true } } - }, - "typeParams": null + } } ] }, @@ -476,8 +467,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -494,8 +483,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -802,8 +790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -820,8 +806,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -843,8 +828,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -869,8 +852,7 @@ "value": true } } - }, - "typeParams": null + } } ] }, @@ -968,8 +950,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -986,8 +966,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } @@ -1199,8 +1178,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1217,8 +1194,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -1460,8 +1436,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1478,8 +1452,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1844,8 +1817,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1862,8 +1833,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1885,8 +1855,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1903,8 +1871,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1926,8 +1893,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1944,8 +1909,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json index b08ab97e00c6..84135fa125b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json @@ -3538,8 +3538,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3565,8 +3563,7 @@ "kind": "symbol" } } - }, - "typeParams": null + } } ] } @@ -3949,8 +3946,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3976,8 +3971,7 @@ "kind": "symbol" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3999,8 +3993,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4036,8 +4028,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4063,13 +4053,11 @@ "kind": "symbol" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -5117,8 +5105,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5144,8 +5130,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5185,8 +5170,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5212,8 +5195,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -8922,7 +8904,6 @@ "end": 6575, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8972,7 +8953,6 @@ "end": 6609, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9050,7 +9030,6 @@ "end": 6657, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9128,7 +9107,6 @@ "end": 6700, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9206,7 +9184,6 @@ "end": 6737, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -10453,7 +10430,6 @@ "end": 7691, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json index 162f51039588..76bc407c1bfa 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json @@ -3455,8 +3455,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3482,8 +3480,7 @@ "kind": "symbol" } } - }, - "typeParams": null + } } ] } @@ -3866,8 +3863,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3893,8 +3888,7 @@ "kind": "symbol" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3916,8 +3910,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3953,8 +3945,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3980,13 +3970,11 @@ "kind": "symbol" } } - }, - "typeParams": null + } } ] } - }, - "typeParams": null + } } ] } @@ -5034,8 +5022,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5061,8 +5047,7 @@ "raw": "\"a\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5102,8 +5087,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5129,8 +5112,7 @@ "raw": "\"b\"" } } - }, - "typeParams": null + } } ] } @@ -8839,7 +8821,6 @@ "end": 6451, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8889,7 +8870,6 @@ "end": 6485, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -8967,7 +8947,6 @@ "end": 6533, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9045,7 +9024,6 @@ "end": 6576, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -9123,7 +9101,6 @@ "end": 6613, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsErrors.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsErrors.json index 8a9cc088386d..c5c56a8a564f 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarationsErrors.json @@ -112,8 +112,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -139,8 +137,7 @@ "kind": "symbol" } } - }, - "typeParams": null + } } ] } @@ -946,7 +943,6 @@ "end": 665, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1118,8 +1114,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1136,8 +1130,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1185,7 +1178,6 @@ "end": 829, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1276,8 +1268,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1294,8 +1284,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } @@ -1342,7 +1331,6 @@ "end": 970, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/unknownControlFlow.json b/crates/swc_ecma_parser/tests/tsc/unknownControlFlow.json index 87617b3e8498..78dc2f320bbb 100644 --- a/crates/swc_ecma_parser/tests/tsc/unknownControlFlow.json +++ b/crates/swc_ecma_parser/tests/tsc/unknownControlFlow.json @@ -223,8 +223,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -241,8 +239,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -950,8 +947,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -968,8 +963,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -12361,8 +12355,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12388,8 +12380,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -12411,8 +12402,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12438,8 +12427,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } } ] } @@ -12491,8 +12479,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12518,8 +12504,7 @@ "raw": "'A'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -12541,8 +12526,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12568,8 +12551,7 @@ "raw": "'B'" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -12591,8 +12573,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -12618,8 +12598,7 @@ "raw": "'C'" } } - }, - "typeParams": null + } } ] } @@ -13677,8 +13656,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -13704,8 +13681,7 @@ "raw": "'right'" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/unknownType1.json b/crates/swc_ecma_parser/tests/tsc/unknownType1.json index 5932e70703be..9824e80a98c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/unknownType1.json +++ b/crates/swc_ecma_parser/tests/tsc/unknownType1.json @@ -1674,8 +1674,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1702,8 +1700,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/unknownType2.json b/crates/swc_ecma_parser/tests/tsc/unknownType2.json index 601c2956f66d..06e28a7ae38a 100644 --- a/crates/swc_ecma_parser/tests/tsc/unknownType2.json +++ b/crates/swc_ecma_parser/tests/tsc/unknownType2.json @@ -2284,8 +2284,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2302,8 +2300,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -2383,8 +2380,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2401,8 +2396,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -2434,8 +2428,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2452,8 +2444,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -2535,8 +2526,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2553,8 +2542,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -2586,8 +2574,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2604,8 +2590,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -6809,8 +6794,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6827,8 +6810,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/validMultipleVariableDeclarations.json b/crates/swc_ecma_parser/tests/tsc/validMultipleVariableDeclarations.json index f8de61e63eaf..aae2c3504c49 100644 --- a/crates/swc_ecma_parser/tests/tsc/validMultipleVariableDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/validMultipleVariableDeclarations.json @@ -412,8 +412,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -430,8 +428,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -453,8 +450,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -471,8 +466,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -904,8 +898,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -922,8 +914,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -945,8 +936,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -963,8 +952,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -1149,8 +1137,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1167,8 +1153,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -1190,8 +1175,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1208,8 +1191,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json b/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json index 1e056421574c..e6e792b0a6a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json @@ -677,8 +677,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -695,8 +693,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -996,7 +993,6 @@ "end": 386, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json b/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json index 1798b1f9caa5..c3b3fc4ca454 100644 --- a/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json @@ -620,8 +620,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -638,8 +636,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -789,7 +786,6 @@ "end": 261, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/varRequireFromTypescript.json b/crates/swc_ecma_parser/tests/tsc/varRequireFromTypescript.json index 3361204d263a..b21bba0b1ac5 100644 --- a/crates/swc_ecma_parser/tests/tsc/varRequireFromTypescript.json +++ b/crates/swc_ecma_parser/tests/tsc/varRequireFromTypescript.json @@ -60,8 +60,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -87,8 +85,7 @@ "raw": "1" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json index e90321789c55..9870d82799ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json +++ b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json @@ -27830,8 +27830,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -27928,8 +27926,7 @@ } } } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -27938,7 +27935,6 @@ "end": 12698, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -28707,8 +28703,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -28725,8 +28719,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } @@ -28900,8 +28893,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -28918,8 +28909,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -28941,8 +28931,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -28959,8 +28947,7 @@ }, "kind": "boolean" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/variance.json b/crates/swc_ecma_parser/tests/tsc/variance.json index 89d9669a33f4..84e91c9f8fb2 100644 --- a/crates/swc_ecma_parser/tests/tsc/variance.json +++ b/crates/swc_ecma_parser/tests/tsc/variance.json @@ -86,8 +86,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -165,8 +163,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json b/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json index 259a296a0113..5c604b2bc5b6 100644 --- a/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json +++ b/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json @@ -228,7 +228,6 @@ "end": 124, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/weakTypesAndLiterals01.json b/crates/swc_ecma_parser/tests/tsc/weakTypesAndLiterals01.json index 7fadcb899ec1..34e73cf76f66 100644 --- a/crates/swc_ecma_parser/tests/tsc/weakTypesAndLiterals01.json +++ b/crates/swc_ecma_parser/tests/tsc/weakTypesAndLiterals01.json @@ -61,8 +61,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -87,8 +85,7 @@ "value": true } } - }, - "typeParams": null + } } ] }, @@ -107,7 +104,6 @@ "end": 145, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -157,7 +153,6 @@ "end": 179, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -210,8 +205,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -228,8 +221,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/witness.json b/crates/swc_ecma_parser/tests/tsc/witness.json index 1fda3b0310db..ad1d61f0a326 100644 --- a/crates/swc_ecma_parser/tests/tsc/witness.json +++ b/crates/swc_ecma_parser/tests/tsc/witness.json @@ -4146,8 +4146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4164,8 +4162,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json index d49f337c1b56..87c7f0fa5eaa 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json @@ -393,8 +393,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -411,8 +409,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json index b8e02bfb2185..caa2c17fdb64 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json @@ -474,8 +474,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -492,8 +490,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json index cfa393a8da79..a026a976c50b 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json @@ -474,8 +474,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -492,8 +490,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/typescript/class/generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/generic/input.ts.json index 56f95173fedf..f3dd76d4a58d 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/generic/input.ts.json @@ -93,8 +93,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -111,8 +109,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/custom/issue-196-01/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/issue-196-01/input.ts.json index 870a55af0db3..b046c346eccc 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/issue-196-01/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/issue-196-01/input.ts.json @@ -60,8 +60,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -78,8 +76,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -101,8 +98,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -119,8 +114,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/custom/issue-196-02/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/issue-196-02/input.ts.json index f381a526e581..b41988669f8f 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/issue-196-02/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/issue-196-02/input.ts.json @@ -53,8 +53,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -71,8 +69,7 @@ }, "kind": "string" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -94,8 +91,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -112,8 +107,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/custom/issue-709-3/input.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/issue-709-3/input.ts.json index bd15f6900587..9e7a18a75363 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/issue-709-3/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/issue-709-3/input.ts.json @@ -124,8 +124,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -142,8 +140,7 @@ }, "kind": "any" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/custom/issue-709/input.d.ts.json b/crates/swc_ecma_parser/tests/typescript/custom/issue-709/input.d.ts.json index 29584429f469..b08f5eb2b463 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/issue-709/input.d.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/issue-709/input.d.ts.json @@ -191,8 +191,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -228,8 +226,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -251,8 +248,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -288,8 +283,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -311,8 +305,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -348,8 +340,7 @@ } ] } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/declare/destructure/input.ts.json b/crates/swc_ecma_parser/tests/typescript/declare/destructure/input.ts.json index 192ffbbb988b..fc6dd5196284 100644 --- a/crates/swc_ecma_parser/tests/typescript/declare/destructure/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/declare/destructure/input.ts.json @@ -108,8 +108,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -126,8 +124,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -149,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -167,8 +162,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/deno/dso/reflect/input.ts.json b/crates/swc_ecma_parser/tests/typescript/deno/dso/reflect/input.ts.json index cd84e57d2020..b220f77aadfc 100644 --- a/crates/swc_ecma_parser/tests/typescript/deno/dso/reflect/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/deno/dso/reflect/input.ts.json @@ -245,8 +245,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -263,8 +261,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -356,8 +353,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -384,8 +379,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -407,8 +401,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -433,8 +425,7 @@ "value": false } } - }, - "typeParams": null + } } ] }, @@ -466,8 +457,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -484,8 +473,7 @@ }, "kind": "never" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -507,8 +495,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -533,8 +519,7 @@ "value": true } } - }, - "typeParams": null + } } ] } @@ -608,7 +593,6 @@ "end": 1224, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -714,7 +698,6 @@ "end": 1271, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -820,7 +803,6 @@ "end": 1318, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -999,7 +981,6 @@ "end": 1390, "ctxt": 0 }, - "readonly": false, "key": { "type": "StringLiteral", "span": { @@ -1188,7 +1169,6 @@ "end": 1498, "ctxt": 0 }, - "readonly": false, "key": { "type": "StringLiteral", "span": { @@ -1460,8 +1440,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1478,8 +1456,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -1488,7 +1465,6 @@ "end": 1608, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1566,7 +1542,6 @@ "end": 1632, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1654,7 +1629,6 @@ "end": 1670, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1768,7 +1742,6 @@ "end": 1703, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1846,7 +1819,6 @@ "end": 1726, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1886,7 +1858,6 @@ "end": 1763, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -1964,7 +1935,6 @@ "end": 1802, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2042,7 +2012,6 @@ "end": 1847, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2414,8 +2383,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2469,8 +2436,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2603,8 +2569,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2621,8 +2585,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsMethodSignature", @@ -2631,7 +2594,6 @@ "end": 2086, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2709,7 +2671,6 @@ "end": 2115, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2786,7 +2747,6 @@ "end": 2150, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2864,7 +2824,6 @@ "end": 2173, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2904,7 +2863,6 @@ "end": 2210, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -2982,7 +2940,6 @@ "end": 2249, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3060,7 +3017,6 @@ "end": 2294, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3381,8 +3337,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3427,8 +3381,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3523,7 +3476,6 @@ "end": 2473, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3563,7 +3515,6 @@ "end": 2506, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3641,7 +3592,6 @@ "end": 2530, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3729,7 +3679,6 @@ "end": 2560, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -3807,7 +3756,6 @@ "end": 2607, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -4226,8 +4174,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4281,8 +4227,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -4633,8 +4578,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4651,8 +4594,7 @@ }, "kind": "symbol" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4674,8 +4616,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4692,8 +4632,7 @@ }, "kind": "symbol" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/es2019/from-entries/input.ts.json b/crates/swc_ecma_parser/tests/typescript/es2019/from-entries/input.ts.json index d041acd7ade3..e542e0c674df 100644 --- a/crates/swc_ecma_parser/tests/typescript/es2019/from-entries/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/es2019/from-entries/input.ts.json @@ -41,7 +41,6 @@ "end": 130, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -305,7 +304,6 @@ "end": 187, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/interface/generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/generic/input.ts.json index 57abb7a65acf..c6e3aedc23d6 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/generic/input.ts.json @@ -89,8 +89,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -107,8 +105,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/interface/method-computed/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/method-computed/input.ts.json index 8ae7dc1d032c..b45dcecf75c4 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/method-computed/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/method-computed/input.ts.json @@ -41,7 +41,6 @@ "end": 45, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { @@ -99,7 +98,6 @@ "end": 79, "ctxt": 0 }, - "readonly": false, "key": { "type": "MemberExpression", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/interface/method-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/method-generic/input.ts.json index 2e8929ed7d13..d38b4b144b28 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/method-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/method-generic/input.ts.json @@ -41,7 +41,6 @@ "end": 60, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -147,8 +146,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -165,8 +162,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/interface/method-optional/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/method-optional/input.ts.json index eced35698ce8..ed2cd82a4ce2 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/method-optional/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/method-optional/input.ts.json @@ -41,7 +41,6 @@ "end": 30, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/interface/method-plain/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/method-plain/input.ts.json index 0d8967986e40..e4d415eb2fb8 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/method-plain/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/method-plain/input.ts.json @@ -41,7 +41,6 @@ "end": 23, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -65,7 +64,6 @@ "end": 64, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/interface/modifiers/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/modifiers/input.ts.json index 67be1040fa2a..cba45916c69a 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/modifiers/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/modifiers/input.ts.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/interface/properties/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/properties/input.ts.json index 5d420e1d76f2..1ca4ac6c8c54 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/properties/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/properties/input.ts.json @@ -54,10 +54,7 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], - "typeAnnotation": null, - "typeParams": null + "typeAnnotation": null }, { "type": "TsPropertySignature", @@ -79,8 +76,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -97,8 +92,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -120,8 +114,6 @@ }, "computed": false, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -138,8 +130,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/interface/property-computed/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/property-computed/input.ts.json index aae825ec5bee..b2cd3a11b7e4 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/property-computed/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/property-computed/input.ts.json @@ -72,8 +72,6 @@ }, "computed": true, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -90,8 +88,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -131,8 +128,6 @@ }, "computed": true, "optional": true, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -149,8 +144,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/interface/property-named-public/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/property-named-public/input.ts.json index 16e9d0dabd18..18a40379aadf 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/property-named-public/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/property-named-public/input.ts.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/interface/reserved-method-name/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/reserved-method-name/input.ts.json index 13ce418f24cf..4626f8f89210 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/reserved-method-name/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/reserved-method-name/input.ts.json @@ -41,7 +41,6 @@ "end": 33, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/interface/separators/input.ts.json b/crates/swc_ecma_parser/tests/typescript/interface/separators/input.ts.json index 6b35e93a9b3a..5cb677216975 100644 --- a/crates/swc_ecma_parser/tests/typescript/interface/separators/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/interface/separators/input.ts.json @@ -54,8 +54,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -72,8 +70,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -95,8 +92,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +108,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -167,8 +161,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -185,8 +177,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -208,8 +199,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -226,8 +215,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -280,8 +268,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -298,8 +284,7 @@ }, "kind": "number" } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -321,8 +306,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -339,8 +322,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1517/case1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-1517/case1/input.ts.json index 752a4df7d28c..bd9fb1b357be 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1517/case1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1517/case1/input.ts.json @@ -41,7 +41,6 @@ "end": 37, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -53,7 +52,6 @@ "optional": false }, "computed": false, - "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -79,7 +77,6 @@ "end": 66, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -91,7 +88,6 @@ "optional": false }, "computed": false, - "optional": false, "param": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1517/case2/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-1517/case2/input.ts.json index bbd7fae31e49..ebc502f0b171 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1517/case2/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1517/case2/input.ts.json @@ -40,7 +40,6 @@ "end": 34, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -52,7 +51,6 @@ "optional": false }, "computed": false, - "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -78,7 +76,6 @@ "end": 63, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { @@ -90,7 +87,6 @@ "optional": false }, "computed": false, - "optional": false, "param": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-2160/case1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-2160/case1/input.ts.json index 70641b413348..59635c74dde6 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-2160/case1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-2160/case1/input.ts.json @@ -233,8 +233,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -259,8 +257,7 @@ "value": false } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-2160/case2/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-2160/case2/input.ts.json index 7fff2dc2755c..f5676d711af7 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-2160/case2/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-2160/case2/input.ts.json @@ -169,8 +169,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -195,8 +193,7 @@ "value": true } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-2161/case1/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-2161/case1/input.tsx.json index 448752e14441..f1998d4999af 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-2161/case1/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-2161/case1/input.tsx.json @@ -302,8 +302,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -320,8 +318,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-4296/1/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-4296/1/input.tsx.json index 6df582564334..60a645b4a8ba 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-4296/1/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-4296/1/input.tsx.json @@ -95,8 +95,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -131,8 +129,7 @@ } } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-7186/1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-7186/1/input.ts.json index e544b4915a8c..8c168df25022 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-7186/1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-7186/1/input.ts.json @@ -48,7 +48,6 @@ "end": 108, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-7186/2/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-7186/2/input.tsx.json index e544b4915a8c..8c168df25022 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-7186/2/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-7186/2/input.tsx.json @@ -48,7 +48,6 @@ "end": 108, "ctxt": 0 }, - "readonly": false, "key": { "type": "Identifier", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-913/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-913/input.ts.json index e51115c972e2..82bb2c72b78c 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-913/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-913/input.ts.json @@ -7807,8 +7807,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7825,8 +7823,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/type-alias/generic-complex/input.ts.json b/crates/swc_ecma_parser/tests/typescript/type-alias/generic-complex/input.ts.json index 87c307374f41..b18d84ec4e25 100644 --- a/crates/swc_ecma_parser/tests/typescript/type-alias/generic-complex/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/type-alias/generic-complex/input.ts.json @@ -89,8 +89,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -107,8 +105,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts.json index d464c3160833..4d477c334098 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/basic/input.ts.json @@ -1707,8 +1707,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1725,8 +1723,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -1956,8 +1953,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1974,8 +1969,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -2547,8 +2541,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2595,8 +2587,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, @@ -2719,8 +2710,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2767,8 +2756,7 @@ "default": null } } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts.json index 102f8560963d..e561f0b5ddb0 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/object-shorthand/input.ts.json @@ -175,8 +175,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -193,8 +191,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, diff --git a/crates/swc_ecma_parser/tests/typescript/types/type-literal/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/type-literal/input.ts.json index 1a5cd363350f..9b2e97e8877c 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/type-literal/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/type-literal/input.ts.json @@ -67,8 +67,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -85,8 +83,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json index 6f653dbde743..d8fb26b3da03 100644 --- a/crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/variance-annotations/1/input.ts.json @@ -85,8 +85,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +111,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -428,8 +425,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -502,8 +497,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -817,8 +811,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -901,8 +893,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1624,8 +1615,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1652,8 +1641,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1817,8 +1805,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1891,8 +1877,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1976,8 +1961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2060,8 +2043,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2145,8 +2127,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2229,8 +2209,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2314,8 +2293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2342,8 +2319,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2365,8 +2341,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2421,8 +2395,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2659,8 +2632,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2723,8 +2694,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2808,8 +2778,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2836,8 +2804,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2859,8 +2826,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2915,8 +2880,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3153,8 +3117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3217,8 +3179,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3302,8 +3263,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3330,8 +3289,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3353,8 +3311,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3409,8 +3365,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3647,8 +3602,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3711,8 +3664,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -4743,8 +4695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4818,8 +4768,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4841,8 +4790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4916,8 +4863,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -5081,8 +5027,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5109,8 +5053,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5132,8 +5075,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5160,8 +5101,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6030,8 +5970,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6048,8 +5986,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -6134,8 +6071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6152,8 +6087,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -6190,8 +6124,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6301,8 +6233,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6461,8 +6392,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6479,8 +6408,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -6911,8 +6839,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6938,8 +6864,7 @@ "raw": "\"PLAY\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6961,8 +6886,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6979,8 +6902,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7077,8 +6999,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7104,8 +7024,7 @@ "raw": "\"PLAY\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7127,8 +7046,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7145,8 +7062,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -7178,8 +7094,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7205,8 +7119,7 @@ "raw": "\"RESET\"" } } - }, - "typeParams": null + } } ] } diff --git a/crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json index 6f653dbde743..d8fb26b3da03 100644 --- a/crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/variance-annotations/with_jsx/input.tsx.json @@ -85,8 +85,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -113,8 +111,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -428,8 +425,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -502,8 +497,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -817,8 +811,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -901,8 +893,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1624,8 +1615,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1652,8 +1641,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -1817,8 +1805,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -1891,8 +1877,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -1976,8 +1961,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2060,8 +2043,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2145,8 +2127,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2229,8 +2209,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -2314,8 +2293,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2342,8 +2319,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2365,8 +2341,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2421,8 +2395,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2659,8 +2632,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2723,8 +2694,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -2808,8 +2778,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2836,8 +2804,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -2859,8 +2826,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -2915,8 +2880,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3153,8 +3117,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3217,8 +3179,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3302,8 +3263,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3330,8 +3289,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -3353,8 +3311,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3409,8 +3365,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -3647,8 +3602,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -3711,8 +3664,7 @@ ] } } - }, - "typeParams": null + } } ] } @@ -4743,8 +4695,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4818,8 +4768,7 @@ } ] } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -4841,8 +4790,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -4916,8 +4863,7 @@ } ] } - }, - "typeParams": null + } } ] } @@ -5081,8 +5027,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5109,8 +5053,7 @@ }, "typeParams": null } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -5132,8 +5075,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -5160,8 +5101,7 @@ }, "typeParams": null } - }, - "typeParams": null + } } ] } @@ -6030,8 +5970,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6048,8 +5986,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -6134,8 +6071,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6152,8 +6087,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -6190,8 +6124,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6301,8 +6233,7 @@ } } } - }, - "typeParams": null + } } ] } @@ -6461,8 +6392,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6479,8 +6408,7 @@ }, "kind": "string" } - }, - "typeParams": null + } } ] }, @@ -6911,8 +6839,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6938,8 +6864,7 @@ "raw": "\"PLAY\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -6961,8 +6886,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -6979,8 +6902,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] } @@ -7077,8 +6999,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7104,8 +7024,7 @@ "raw": "\"PLAY\"" } } - }, - "typeParams": null + } }, { "type": "TsPropertySignature", @@ -7127,8 +7046,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7145,8 +7062,7 @@ }, "kind": "number" } - }, - "typeParams": null + } } ] }, @@ -7178,8 +7094,6 @@ }, "computed": false, "optional": false, - "init": null, - "params": [], "typeAnnotation": { "type": "TsTypeAnnotation", "span": { @@ -7205,8 +7119,7 @@ "raw": "\"RESET\"" } } - }, - "typeParams": null + } } ] }