From 019cf371994b87a92fd26fc623959a797f35991b Mon Sep 17 00:00:00 2001 From: magic-akari Date: Tue, 10 Jan 2023 13:08:29 +0800 Subject: [PATCH] feat(es/typescript): Support const modifier on type parameters (#6672) **Related issue:** - https://github.com/microsoft/TypeScript/pull/51865. --- .../typeParameterConstModifiers.1.normal.js | 25 + .../typeParameterConstModifiers.2.minified.js | 25 + crates/swc_ecma_ast/src/typescript.rs | 3 + crates/swc_ecma_codegen/src/typescript.rs | 5 + crates/swc_ecma_parser/src/error.rs | 6 + .../src/parser/class_and_fn.rs | 8 +- crates/swc_ecma_parser/src/parser/expr.rs | 2 +- .../swc_ecma_parser/src/parser/typescript.rs | 50 +- .../tests/tsc/1.0lib-noErrors.json | 9 + ...oduleMemberThatUsesClassTypeParameter.json | 5 + ...nericClassStaticFunctionOfTheSameName.json | 3 + ...nericClassStaticFunctionOfTheSameName.json | 2 + ...taticFunctionUsingClassPrivateStatics.json | 2 + ...lassHeritageListMemberTypeAnnotations.json | 1 + ...cessibleTypeInTypeParameterConstraint.json | 1 + ...lassHeritageListMemberTypeAnnotations.json | 1 + ...cessibleTypeInTypeParameterConstraint.json | 1 + .../tsc/MemberFunctionDeclaration7_es6.json | 1 + ...duleWithExportedAndNonExportedClasses.json | 4 + ...leWithExportedAndNonExportedFunctions.json | 6 + ...dAndNonExportedLocalVarsOfTheSameName.json | 1 + ...achWithExportedLocalVarsOfTheSameName.json | 1 + ...WithTheSameNameAndDifferentCommonRoot.json | 1 + ...dulesWithTheSameNameAndSameCommonRoot.json | 1 + .../tests/tsc/accessorsOverrideProperty8.json | 5 + .../tests/tsc/accessorsOverrideProperty9.json | 4 + ...nOperatorWithConstrainedTypeParameter.json | 4 + .../additionOperatorWithTypeParameter.json | 2 + .../tests/tsc/ambientDeclarations.json | 1 + .../tsc/anyAssignabilityInInheritance.json | 3 + .../tests/tsc/anyAssignableToEveryType.json | 4 + .../tests/tsc/anyAssignableToEveryType2.json | 5 + .../tests/tsc/apparentTypeSubtyping.json | 3 + .../tests/tsc/apparentTypeSupertype.json | 1 + .../arithmeticOperatorWithTypeParameter.json | 1 + .../tests/tsc/arrayLiteralInference.json | 1 + .../arrayLiteralsWithRecursiveGenerics.json | 3 + .../tests/tsc/arrayOfFunctionTypes3.json | 3 + .../tests/tsc/asOperatorAmbiguity.json | 1 + .../tests/tsc/assignAnyToEveryType.json | 2 + .../tests/tsc/assignEveryTypeToAny.json | 2 + .../assignmentCompatWithCallSignatures.json | 2 + .../assignmentCompatWithCallSignatures2.json | 2 + .../assignmentCompatWithCallSignatures3.json | 26 + .../assignmentCompatWithCallSignatures4.json | 22 + .../assignmentCompatWithCallSignatures5.json | 33 + .../assignmentCompatWithCallSignatures6.json | 21 + ...ignmentCompatWithConstructSignatures3.json | 26 + ...ignmentCompatWithConstructSignatures4.json | 22 + ...ignmentCompatWithConstructSignatures5.json | 33 + ...ignmentCompatWithConstructSignatures6.json | 21 + ...gnmentCompatWithGenericCallSignatures.json | 2 + ...nmentCompatWithGenericCallSignatures2.json | 2 + ...nmentCompatWithGenericCallSignatures3.json | 8 + ...nmentCompatWithGenericCallSignatures4.json | 3 + ...cCallSignaturesWithOptionalParameters.json | 31 + .../assignmentCompatWithNumericIndexer.json | 2 + .../assignmentCompatWithNumericIndexer2.json | 2 + .../assignmentCompatWithNumericIndexer3.json | 2 + .../assignmentCompatWithStringIndexer.json | 2 + .../assignmentCompatWithStringIndexer2.json | 2 + .../assignmentCompatWithStringIndexer3.json | 2 + .../assignmentGenericLookupTypeNarrowing.json | 3 + .../tests/tsc/assignmentTypeNarrowing.json | 1 + .../tests/tsc/asyncAliasReturnType_es5.json | 1 + .../tests/tsc/asyncAliasReturnType_es6.json | 1 + .../tests/tsc/asyncAwait_es2017.json | 1 + .../tests/tsc/asyncAwait_es5.json | 1 + .../tests/tsc/asyncAwait_es6.json | 1 + ...asyncGeneratorGenericNonWrappedReturn.json | 1 + .../tests/tsc/asyncImportedPromise_es5.json | 2 + .../tests/tsc/asyncImportedPromise_es6.json | 2 + .../tsc/asyncQualifiedReturnType_es5.json | 1 + .../tsc/asyncQualifiedReturnType_es6.json | 1 + .../tests/tsc/await_incorrectThisType.json | 12 + ...estCommonTypeOfConditionalExpressions.json | 2 + ...stCommonTypeOfConditionalExpressions2.json | 7 + .../tests/tsc/bigintMissingES2019.json | 2 + .../tests/tsc/bigintMissingES2020.json | 2 + .../tests/tsc/bigintMissingESNext.json | 2 + .../tests/tsc/bivariantInferences.json | 2 + .../tests/tsc/callChain.3.json | 2 + .../swc_ecma_parser/tests/tsc/callChain.json | 2 + .../tests/tsc/callChainInference.json | 1 + ...ionWithIncorrectNumberOfTypeArguments.json | 14 + ...lGenericFunctionWithZeroTypeArguments.json | 7 + ...llSignatureAssignabilityInInheritance.json | 6 + ...lSignatureAssignabilityInInheritance2.json | 27 + ...lSignatureAssignabilityInInheritance3.json | 24 + ...lSignatureAssignabilityInInheritance4.json | 33 + ...lSignatureAssignabilityInInheritance5.json | 22 + ...lSignatureAssignabilityInInheritance6.json | 21 + ...eWithoutReturnTypeAnnotationInference.json | 1 + ...lSignaturesThatDifferOnlyByReturnType.json | 7 + ...SignaturesThatDifferOnlyByReturnType2.json | 1 + ...SignaturesThatDifferOnlyByReturnType3.json | 2 + ...ithAccessibilityModifiersOnParameters.json | 5 + ...callSignaturesWithDuplicateParameters.json | 5 + .../tests/tsc/callWithMissingVoid.json | 3 + ...ithMissingVoidUndefinedUnknownAnyInJs.json | 1 + .../tests/tsc/checkJsdocTypeTag4.json | 1 + .../tsc/circularIndexedAccessErrors.json | 4 + .../tests/tsc/classAbstractGeneric.json | 6 + .../tsc/classConstructorAccessibility.json | 3 + .../tests/tsc/classExtendingClass.json | 3 + .../tsc/classExtendingClassLikeType.json | 6 + .../tests/tsc/classExtendsItself.json | 2 + .../tsc/classExtendsItselfIndirectly.json | 3 + .../tsc/classExtendsItselfIndirectly2.json | 3 + .../tsc/classExtendsItselfIndirectly3.json | 3 + .../tests/tsc/classIsSubtypeOfBaseType.json | 1 + .../classWithBaseClassButNoConstructor.json | 6 + .../tests/tsc/classWithConstructors.json | 5 + .../classWithNoConstructorOrBaseClass.json | 2 + .../tests/tsc/classWithOptionalParameter.json | 1 + .../classWithTwoConstructorDefinitions.json | 1 + .../tsc/classWithoutExplicitConstructor.json | 1 + .../commaOperatorOtherInvalidOperation.json | 2 + .../tsc/commaOperatorOtherValidOperation.json | 2 + ...sonOperatorWithIdenticalTypeParameter.json | 1 + ...hNoRelationshipObjectsOnCallSignature.json | 2 + ...tionshipObjectsOnConstructorSignature.json | 2 + ...hipObjectsOnInstantiatedCallSignature.json | 7 + ...ctsOnInstantiatedConstructorSignature.json | 7 + ...eratorWithNoRelationshipTypeParameter.json | 2 + ...comparisonOperatorWithOneOperandIsAny.json | 1 + ...omparisonOperatorWithOneOperandIsNull.json | 1 + ...isonOperatorWithOneOperandIsUndefined.json | 1 + ...typeObjectOnInstantiatedCallSignature.json | 7 + ...ectOnInstantiatedConstructorSignature.json | 7 + .../comparisonOperatorWithTypeParameter.json | 3 + .../tsc/computedPropertyNames32_ES5.json | 2 + .../tsc/computedPropertyNames32_ES6.json | 2 + .../tsc/computedPropertyNames33_ES5.json | 2 + .../tsc/computedPropertyNames33_ES6.json | 2 + .../tsc/computedPropertyNames34_ES5.json | 2 + .../tsc/computedPropertyNames34_ES6.json | 2 + .../tsc/computedPropertyNames35_ES5.json | 2 + .../tsc/computedPropertyNames35_ES6.json | 2 + .../tsc/computedPropertyNames48_ES5.json | 1 + .../tsc/computedPropertyNames48_ES6.json | 1 + .../tsc/computedPropertyNames51_ES5.json | 2 + .../tsc/computedPropertyNames51_ES6.json | 2 + .../tests/tsc/computedPropertyNames8_ES5.json | 2 + .../tests/tsc/computedPropertyNames8_ES6.json | 2 + .../tests/tsc/computedPropertyNames9_ES5.json | 1 + .../tests/tsc/computedPropertyNames9_ES6.json | 1 + ...putedPropertyNamesContextualType6_ES5.json | 2 + ...putedPropertyNamesContextualType6_ES6.json | 2 + ...putedPropertyNamesContextualType7_ES5.json | 4 + ...putedPropertyNamesContextualType7_ES6.json | 4 + .../tests/tsc/conditionalTypes1.json | 110 + .../tests/tsc/conditionalTypes2.json | 74 + .../tsc/conditionalTypesExcessProperties.json | 2 + .../tests/tsc/constAssertions.json | 4 + .../tsc/constraintSatisfactionWithAny.json | 8 + .../tsc/constraintSatisfactionWithAny2.json | 3 + ...constraintSatisfactionWithEmptyObject.json | 6 + ...ctSignatureAssignabilityInInheritance.json | 5 + ...tSignatureAssignabilityInInheritance2.json | 27 + ...tSignatureAssignabilityInInheritance3.json | 22 + ...tSignatureAssignabilityInInheritance4.json | 39 + ...tSignatureAssignabilityInInheritance5.json | 22 + ...tSignatureAssignabilityInInheritance6.json | 21 + ...tructSignaturesWithIdenticalOverloads.json | 6 + .../tsc/constructSignaturesWithOverloads.json | 6 + .../constructSignaturesWithOverloads2.json | 2 + ...thOverloadsThatDifferOnlyByReturnType.json | 6 + ...nstructorDefaultValuesReferencingThis.json | 2 + .../tsc/constructorHasPrototypeProperty.json | 4 + ...ructorImplementationWithDefaultValues.json | 2 + ...uctorImplementationWithDefaultValues2.json | 3 + ...constructorOverloadsWithDefaultValues.json | 1 + ...ructorOverloadsWithOptionalParameters.json | 1 + .../tsc/constructorParameterProperties.json | 1 + ...tructorWithAssignableReturnExpression.json | 2 + .../constructorWithExpressionLessReturn.json | 1 + .../tsc/contextualSignatureInstantiation.json | 9 + .../contextualTypeWithUnionTypeMembers.json | 2 + .../tests/tsc/controlFlowGenericTypes.json | 30 + .../tests/tsc/controlFlowIfStatement.json | 3 + .../tests/tsc/controlFlowOptionalChain.json | 2 + .../tests/tsc/controlFlowTruthiness.json | 2 + .../tests/tsc/covariantCallbacks.json | 1 + .../tests/tsc/declarationFiles.json | 1 + .../tests/tsc/decoratorCallGeneric.json | 2 + .../tests/tsc/decoratorOnClass1.es6.json | 1 + .../tests/tsc/decoratorOnClass2.es6.json | 1 + .../tests/tsc/decoratorOnClass3.es6.json | 1 + .../tests/tsc/decoratorOnClass4.es6.json | 1 + .../tests/tsc/decoratorOnClass5.es6.json | 1 + .../tests/tsc/decoratorOnClass6.es6.json | 1 + .../tests/tsc/decoratorOnClass7.es6.json | 1 + .../tests/tsc/decoratorOnClass8.es6.json | 1 + .../tsc/decoratorOnClassAccessor1.es6.json | 1 + .../tsc/decoratorOnClassMethod1.es6.json | 1 + .../tsc/dependentDestructuredVariables.json | 7 + ...rivedClassConstructorWithoutSuperCall.json | 4 + .../tsc/derivedClassParameterProperties.json | 3 + .../tests/tsc/derivedClassTransitivity3.json | 3 + ...erivedClassWithoutExplicitConstructor.json | 2 + ...rivedClassWithoutExplicitConstructor2.json | 2 + ...rivedClassWithoutExplicitConstructor3.json | 3 + .../tests/tsc/derivedGenericClassWithAny.json | 2 + ...destructuringParameterDeclaration3ES5.json | 2 + ...uringParameterDeclaration3ES5iterable.json | 2 + ...destructuringParameterDeclaration3ES6.json | 2 + .../destructuringParameterDeclaration5.json | 5 + .../directDependenceBetweenTypeAliases.json | 3 + .../tsc/discriminatedUnionInference.json | 7 + .../tests/tsc/discriminatedUnionTypes2.json | 5 + .../tests/tsc/duplicateNumericIndexers.json | 1 + .../tests/tsc/duplicatePropertyNames.json | 1 + .../tests/tsc/duplicateStringIndexers.json | 1 + .../tests/tsc/elementAccessChain.json | 1 + ...tionWithExtensionAndTypeArgumentInES6.json | 1 + ...ationWithTypeArgumentAndOverloadInES6.json | 1 + ...ClassDeclarationWithTypeArgumentInES6.json | 1 + .../tests/tsc/enumAssignability.json | 6 + .../tsc/enumAssignabilityInInheritance.json | 3 + .../enumIsNotASubtypeOfAnythingButNumber.json | 5 + .../tests/tsc/everyTypeAssignableToAny.json | 4 + ...everyTypeWithAnnotationAndInitializer.json | 1 + ...peWithAnnotationAndInvalidInitializer.json | 1 + .../tests/tsc/everyTypeWithInitializer.json | 1 + ...ponentiationOperatorWithTypeParameter.json | 1 + .../tests/tsc/exportAssignTypes.json | 2 + ...xportAssignmentConstrainedGenericType.json | 1 + .../tsc/exportAssignmentGenericType.json | 1 + .../tests/tsc/extendBooleanInterface.json | 1 + .../tests/tsc/extendNumberInterface.json | 1 + .../tests/tsc/extendStringInterface.json | 1 + .../tests/tsc/for-inStatements.json | 2 + .../tests/tsc/for-inStatementsInvalid.json | 1 + .../tests/tsc/forStatements.json | 1 + .../tsc/forStatementsMultipleInvalidDecl.json | 1 + .../tsc/functionConstraintSatisfaction.json | 14 + .../tsc/functionConstraintSatisfaction2.json | 9 + .../tsc/functionConstraintSatisfaction3.json | 9 + .../functionExpressionContextualTyping1.json | 3 + .../functionExpressionContextualTyping3.json | 1 + .../tests/tsc/functionImplementations.json | 2 + .../tests/tsc/functionLiteral.json | 2 + .../tsc/functionLiteralForOverloads.json | 6 + .../tsc/functionLiteralForOverloads2.json | 5 + .../tests/tsc/functionLiterals.json | 7 + .../tests/tsc/functionOverloadErrors.json | 13 + .../functionWithMultipleReturnStatements.json | 5 + ...functionWithMultipleReturnStatements2.json | 1 + .../tests/tsc/generatedContextualTyping.json | 1 + .../tests/tsc/generatorImplicitAny.json | 1 + .../tsc/generatorReturnTypeInference.json | 6 + ...generatorReturnTypeInferenceNonStrict.json | 6 + .../tests/tsc/generatorTypeCheck45.json | 2 + .../tests/tsc/generatorTypeCheck46.json | 2 + .../tests/tsc/generatorTypeCheck62.json | 2 + .../tests/tsc/generatorTypeCheck63.json | 2 + .../tsc/generatorYieldContextualType.json | 6 + crates/swc_ecma_parser/tests/tsc/generic.json | 1 + ...AndNonGenericInterfaceWithTheSameName.json | 4 + ...ndNonGenericInterfaceWithTheSameName2.json | 2 + ...erloadedMethodWithOverloadedArguments.json | 17 + .../tsc/genericCallTypeArgumentInference.json | 29 + .../tsc/genericCallWithArrayLiteralArgs.json | 1 + ...lWithConstraintsTypeArgumentInference.json | 31 + ...WithConstraintsTypeArgumentInference2.json | 2 + ...ricCallWithConstructorTypedArguments5.json | 6 + ...genericCallWithFunctionTypedArguments.json | 12 + ...enericCallWithFunctionTypedArguments2.json | 8 + ...enericCallWithFunctionTypedArguments3.json | 4 + ...enericCallWithFunctionTypedArguments4.json | 4 + ...enericCallWithFunctionTypedArguments5.json | 7 + ...ericCallWithGenericSignatureArguments.json | 5 + ...ricCallWithGenericSignatureArguments2.json | 12 + ...ricCallWithGenericSignatureArguments3.json | 3 + .../genericCallWithNonSymmetricSubtypes.json | 1 + .../tsc/genericCallWithObjectLiteralArgs.json | 1 + .../tsc/genericCallWithObjectTypeArgs.json | 2 + .../tsc/genericCallWithObjectTypeArgs2.json | 6 + ...cCallWithObjectTypeArgsAndConstraints.json | 3 + ...CallWithObjectTypeArgsAndConstraints2.json | 4 + ...CallWithObjectTypeArgsAndConstraints3.json | 4 + ...CallWithObjectTypeArgsAndConstraints4.json | 4 + ...CallWithObjectTypeArgsAndConstraints5.json | 4 + ...ericCallWithObjectTypeArgsAndIndexers.json | 2 + ...llWithObjectTypeArgsAndIndexersErrors.json | 4 + ...CallWithObjectTypeArgsAndInitializers.json | 13 + ...llWithObjectTypeArgsAndNumericIndexer.json | 5 + ...allWithObjectTypeArgsAndStringIndexer.json | 5 + ...thOverloadedConstructorTypedArguments.json | 10 + ...hOverloadedConstructorTypedArguments2.json | 9 + ...lWithOverloadedFunctionTypedArguments.json | 11 + ...WithOverloadedFunctionTypedArguments2.json | 10 + .../tests/tsc/genericCallWithTupleType.json | 2 + .../tsc/genericClassExpressionInFunction.json | 5 + ...ClassWithFunctionTypedMemberArguments.json | 20 + ...ClassWithObjectTypeArgsAndConstraints.json | 9 + .../tests/tsc/genericContextualTypes1.json | 36 + .../tests/tsc/genericFunctionParameters.json | 8 + ...nstantiationEquivalentToObjectLiteral.json | 6 + .../tests/tsc/genericObjectRest.json | 7 + .../tests/tsc/genericRestArity.json | 1 + .../tests/tsc/genericRestArityStrict.json | 1 + .../tests/tsc/genericRestParameters1.json | 23 + .../tests/tsc/genericRestParameters2.json | 5 + .../tests/tsc/genericRestParameters3.json | 6 + .../tests/tsc/genericSetterInClassType.json | 2 + .../tests/tsc/genericTypeAliases.json | 13 + .../tests/tsc/grammarAmbiguities.json | 2 + .../tests/tsc/heterogeneousArrayLiterals.json | 8 + .../tests/tsc/identicalCallSignatures.json | 5 + .../tests/tsc/identicalCallSignatures2.json | 2 + .../tests/tsc/identicalCallSignatures3.json | 2 + .../tests/tsc/ifDoWhileStatements.json | 1 + .../tests/tsc/importTypeGeneric.json | 2 + .../tests/tsc/importTypeGenericTypes.json | 5 + .../tsc/inOperatorWithValidOperands.json | 4 + .../tsc/indexSignatureTypeInference.json | 4 + .../tests/tsc/inferFromBindingPattern.json | 11 + .../tests/tsc/inferThisType.json | 5 + .../tests/tsc/inferTypes2.json | 11 + .../tests/tsc/inferingFromAny.json | 29 + ...infiniteExpansionThroughInstantiation.json | 3 + ...nfiniteExpansionThroughInstantiation2.json | 1 + ...infiniteExpansionThroughTypeInference.json | 2 + ...itializerReferencingConstructorLocals.json | 1 + ...lizerReferencingConstructorParameters.json | 1 + .../innerTypeParameterShadowingOuterOne.json | 6 + .../innerTypeParameterShadowingOuterOne2.json | 6 + .../tsc/instanceMemberInitialization.json | 4 + ...tancePropertiesInheritedIntoClassType.json | 4 + .../tsc/instancePropertyInClassType.json | 2 + ...tanceofOperatorWithLHSIsTypeParameter.json | 1 + ...icClassWithWrongNumberOfTypeArguments.json | 3 + ...iateGenericClassWithZeroTypeArguments.json | 3 + .../interfaceExtendsObjectIntersection.json | 4 + ...erfaceExtendsObjectIntersectionErrors.json | 5 + ...rfaceThatIndirectlyInheritsFromItself.json | 3 + .../tsc/interfaceWithMultipleBaseTypes.json | 8 + .../tsc/interfaceWithPropertyOfEveryType.json | 2 + ...ceWithPropertyThatIsPrivateInBaseType.json | 2 + ...eWithPropertyThatIsPrivateInBaseType2.json | 2 + .../tsc/intersectionAsWeakTypeSource.json | 3 + ...rsectionMemberOfUnionNarrowsCorrectly.json | 2 + .../tests/tsc/intersectionNarrowing.json | 5 + .../tests/tsc/intersectionReduction.json | 10 + .../tsc/intersectionReductionStrict.json | 7 + .../tests/tsc/intersectionThisTypes.json | 1 + .../tests/tsc/intersectionTypeInference.json | 6 + .../tests/tsc/intersectionTypeInference2.json | 4 + .../tests/tsc/intersectionTypeInference3.json | 3 + .../tsc/intersectionWithIndexSignatures.json | 3 + .../tsc/intersectionWithUnionConstraint.json | 17 + .../tsc/intersectionsAndEmptyObjects.json | 6 + .../tests/tsc/intrinsicKeyword.json | 4 + .../tests/tsc/intrinsicTypes.json | 8 + .../tests/tsc/invalidAssignmentsToVoid.json | 1 + .../tests/tsc/invalidBooleanAssignments.json | 1 + .../tests/tsc/invalidEnumAssignments.json | 1 + .../invalidMultipleVariableDeclarations.json | 1 + .../tests/tsc/invalidNumberAssignments.json | 1 + .../tests/tsc/invalidStringAssignments.json | 1 + .../tsc/invalidUndefinedAssignments.json | 1 + .../tests/tsc/invalidUndefinedValues.json | 1 + .../tests/tsc/invalidVoidAssignments.json | 1 + .../tests/tsc/invalidVoidValues.json | 1 + .../tsc/isomorphicMappedTypeInference.json | 37 + .../tests/tsc/iteratorSpreadInCall10.json | 1 + .../tests/tsc/iteratorSpreadInCall11.json | 1 + .../tests/tsc/iteratorSpreadInCall12.json | 1 + .../tests/tsc/iteratorSpreadInCall7.json | 1 + .../tests/tsc/iteratorSpreadInCall8.json | 1 + .../tests/tsc/iteratorSpreadInCall9.json | 1 + ...sClassImplementsGenericsSerialization.json | 1 + .../tests/tsc/jsDeclarationsClassesErr.json | 2 + .../tests/tsc/jsDeclarationsInterfaces.json | 8 + .../tsc/jsdocAugments_withTypeParameter.json | 1 + .../jsdocImplements_namespacedInterface.json | 1 + .../tests/tsc/keyofAndForIn.json | 8 + .../tests/tsc/keyofAndIndexedAccess.json | 136 + .../tests/tsc/keyofAndIndexedAccess2.json | 41 + .../tsc/keyofAndIndexedAccessErrors.json | 21 + .../tsc/keyofInferenceIntersectsResults.json | 2 + ...keyofInferenceLowerPriorityThanReturn.json | 12 + .../tests/tsc/keyofIntersection.json | 11 + .../tests/tsc/libReferenceNoLib.json | 1 + .../tests/tsc/libReferenceNoLibBundle.json | 1 + .../tests/tsc/literalTypeWidening.json | 11 + .../tests/tsc/literalTypes2.json | 11 + .../tests/tsc/localTypes3.json | 6 + .../tests/tsc/localTypes4.json | 2 + .../tests/tsc/localTypes5.json | 5 + .../logicalAndOperatorWithTypeParameters.json | 3 + .../logicalOrOperatorWithTypeParameters.json | 7 + .../tsc/mappedTypeAsClauseRelationships.json | 17 + .../tests/tsc/mappedTypeAsClauses.json | 69 + .../tests/tsc/mappedTypeConstraints.json | 8 + .../tests/tsc/mappedTypeErrors.json | 34 + .../tests/tsc/mappedTypeErrors2.json | 13 + .../tests/tsc/mappedTypeInferenceErrors.json | 4 + .../tests/tsc/mappedTypeModifiers.json | 17 + .../mappedTypeOverlappingStringEnumKeys.json | 1 + .../tests/tsc/mappedTypeRelationships.json | 85 + .../tests/tsc/mappedTypeWithAny.json | 20 + .../tests/tsc/mappedTypes1.json | 31 + .../tests/tsc/mappedTypes2.json | 20 + .../tests/tsc/mappedTypes3.json | 5 + .../tests/tsc/mappedTypes4.json | 11 + .../tests/tsc/mappedTypes5.json | 4 + .../tests/tsc/mappedTypes6.json | 40 + .../tests/tsc/mappedTypesAndObjects.json | 7 + .../tests/tsc/mappedTypesArraysTuples.json | 22 + ...nctionOverloadMixingStaticAndInstance.json | 2 + .../memberFunctionsWithPrivateOverloads.json | 1 + .../memberFunctionsWithPublicOverloads.json | 1 + ...erFunctionsWithPublicPrivateOverloads.json | 1 + .../tests/tsc/mergeThreeInterfaces.json | 6 + .../tests/tsc/mergeTwoInterfaces.json | 4 + ...nterfacesWithConflictingPropertyNames.json | 6 + ...terfacesWithConflictingPropertyNames2.json | 6 + .../mergedInterfacesWithMultipleBases.json | 4 + .../mergedInterfacesWithMultipleBases2.json | 6 + .../mergedInterfacesWithMultipleBases3.json | 6 + .../mergedInterfacesWithMultipleBases4.json | 6 + .../tsc/methodSignaturesWithOverloads.json | 4 + .../tsc/methodSignaturesWithOverloads2.json | 4 + .../tests/tsc/mixinAbstractClasses.2.json | 1 + .../tests/tsc/mixinAbstractClasses.json | 1 + ...xinAbstractClassesReturnTypeInference.json | 1 + .../tests/tsc/mixinAccessModifiers.json | 4 + .../tests/tsc/mixinClassesAnnotated.json | 3 + .../tests/tsc/mixinClassesAnonymous.json | 4 + .../tsc/moduleWithStatementsOfEveryKind.json | 4 + .../tests/tsc/multipleNumericIndexers.json | 2 + .../tests/tsc/multipleStringIndexers.json | 2 + .../tests/tsc/namedTupleMembers.json | 4 + .../tsc/narrowingConstrainedTypeVariable.json | 4 + .../narrowingGenericTypeFromInstanceof01.json | 5 + .../tests/tsc/neverInference.json | 6 + .../tests/tsc/neverReturningFunctions1.json | 4 + .../swc_ecma_parser/tests/tsc/neverType.json | 1 + .../tests/tsc/newOperatorConformance.json | 3 + .../tests/tsc/newOperatorErrorCases.json | 1 + .../tests/tsc/noUncheckedIndexedAccess.json | 7 + .../nominalSubtypeCheckOfTypeParameter.json | 6 + .../nominalSubtypeCheckOfTypeParameter2.json | 5 + ...GenericTypeReferenceWithTypeArguments.json | 1 + .../tsc/nonPrimitiveAndTypeVariables.json | 8 + ...nPrimitiveConstraintOfIndexAccessType.json | 20 + .../tests/tsc/nonPrimitiveInGeneric.json | 5 + .../tests/tsc/nonPrimitiveStrictNull.json | 1 + .../tests/tsc/nullAssignableToEveryType.json | 4 + ...nullIsSubtypeOfEverythingButUndefined.json | 6 + .../tsc/objectLiteralContextualTyping.json | 1 + .../tests/tsc/objectLiteralNormalization.json | 1 + .../tests/tsc/objectRestNegative.json | 1 + .../tests/tsc/objectSpread.json | 4 + ...bjectTypeWithRecursiveWrappedProperty.json | 1 + ...jectTypeWithRecursiveWrappedProperty2.json | 1 + ...ursiveWrappedPropertyCheckedNominally.json | 6 + ...ithStringAndNumberIndexSignatureToAny.json | 3 + .../tests/tsc/objectTypesIdentity.json | 1 + .../tests/tsc/objectTypesIdentity2.json | 1 + ...objectTypesIdentityWithCallSignatures.json | 2 + ...bjectTypesIdentityWithCallSignatures2.json | 2 + ...bjectTypesIdentityWithCallSignatures3.json | 1 + ...ithCallSignaturesDifferingParamCounts.json | 2 + ...thCallSignaturesDifferingParamCounts2.json | 1 + ...entityWithCallSignaturesWithOverloads.json | 2 + ...ctTypesIdentityWithComplexConstraints.json | 3 + ...tTypesIdentityWithConstructSignatures.json | 2 + ...TypesIdentityWithConstructSignatures2.json | 2 + ...nstructSignaturesDifferingParamCounts.json | 2 + ...ypesIdentityWithGenericCallSignatures.json | 7 + ...pesIdentityWithGenericCallSignatures2.json | 14 + ...cCallSignaturesDifferingByConstraints.json | 7 + ...CallSignaturesDifferingByConstraints2.json | 16 + ...CallSignaturesDifferingByConstraints3.json | 20 + ...icCallSignaturesDifferingByReturnType.json | 7 + ...cCallSignaturesDifferingByReturnType2.json | 7 + ...ignaturesDifferingTypeParameterCounts.json | 25 + ...gnaturesDifferingTypeParameterCounts2.json | 13 + ...SignaturesDifferingTypeParameterNames.json | 7 + ...thGenericCallSignaturesOptionalParams.json | 7 + ...hGenericCallSignaturesOptionalParams2.json | 14 + ...hGenericCallSignaturesOptionalParams3.json | 14 + ...tructSignaturesDifferingByConstraints.json | 6 + ...ructSignaturesDifferingByConstraints2.json | 14 + ...ructSignaturesDifferingByConstraints3.json | 18 + ...structSignaturesDifferingByReturnType.json | 6 + ...tructSignaturesDifferingByReturnType2.json | 6 + ...ignaturesDifferingTypeParameterCounts.json | 24 + ...SignaturesDifferingTypeParameterNames.json | 6 + ...ericConstructSignaturesOptionalParams.json | 6 + ...ricConstructSignaturesOptionalParams2.json | 12 + ...ricConstructSignaturesOptionalParams3.json | 12 + ...jectTypesIdentityWithNumericIndexers1.json | 1 + ...jectTypesIdentityWithNumericIndexers2.json | 1 + ...jectTypesIdentityWithNumericIndexers3.json | 1 + .../objectTypesIdentityWithOptionality.json | 1 + .../tsc/objectTypesIdentityWithPrivates.json | 1 + .../tsc/objectTypesIdentityWithPrivates2.json | 2 + .../tsc/objectTypesIdentityWithPrivates3.json | 2 + .../tsc/objectTypesIdentityWithPublics.json | 1 + ...objectTypesIdentityWithStringIndexers.json | 1 + ...bjectTypesIdentityWithStringIndexers2.json | 1 + .../tests/tsc/optionalChainingInference.json | 1 + ...pertyAssignableToStringIndexSignature.json | 1 + .../tests/tsc/overloadResolution.json | 11 + .../overloadResolutionClassConstructors.json | 6 + .../tsc/overloadResolutionConstructors.json | 11 + .../swc_ecma_parser/tests/tsc/override19.json | 2 + .../tests/tsc/overrideInterfaceProperty.json | 4 + .../tsc/parametersWithNoAnnotationAreAny.json | 1 + .../tsc/parenthesizedContexualTyping1.json | 3 + .../tsc/parenthesizedContexualTyping2.json | 4 + .../tsc/parenthesizedContexualTyping3.json | 3 + .../tsc/parserAccessibilityAfterStatic14.json | 1 + .../tsc/parserCastVersusArrowFunction1.json | 4 + .../tests/tsc/parserClassDeclaration25.json | 2 + .../parserFunctionPropertyAssignment4.json | 1 + .../tests/tsc/parserGenericClass1.json | 1 + .../tests/tsc/parserGenericClass2.json | 2 + .../tests/tsc/parserGenericConstraint1.json | 1 + .../tests/tsc/parserGenericConstraint2.json | 1 + .../tests/tsc/parserGenericConstraint3.json | 1 + .../tests/tsc/parserGenericConstraint4.json | 1 + .../tests/tsc/parserGenericConstraint5.json | 1 + .../tests/tsc/parserGenericConstraint6.json | 1 + .../tests/tsc/parserGenericConstraint7.json | 1 + ...parserGenericsInInterfaceDeclaration1.json | 5 + .../parserGetAccessorWithTypeParameters1.json | 1 + .../tests/tsc/parserMethodSignature11.json | 1 + .../tests/tsc/parserMethodSignature12.json | 1 + .../tests/tsc/parserMethodSignature3.json | 1 + .../tests/tsc/parserMethodSignature4.json | 1 + .../tests/tsc/parserMethodSignature7.json | 1 + .../tests/tsc/parserMethodSignature8.json | 1 + .../parserSetAccessorWithTypeParameters1.json | 1 + ...tiallyAnnotatedFunctionInferenceError.json | 1 + ...tedFunctionInferenceWithTypeParameter.json | 2 + .../tests/tsc/privateNameEmitHelpers.json | 4 + .../tsc/privateNameStaticEmitHelpers.json | 4 + .../tests/tsc/privateNamesAndDecorators.json | 1 + .../tsc/privateNamesAndGenericClasses-2.json | 1 + .../tsc/privateNamesConstructorChain-2.json | 2 + .../tsc/privateNamesInGenericClasses.json | 1 + .../tests/tsc/propertyAccessChain.json | 1 + ...yAccessOnTypeParameterWithConstraints.json | 4 + ...AccessOnTypeParameterWithConstraints2.json | 12 + ...AccessOnTypeParameterWithConstraints3.json | 10 + ...AccessOnTypeParameterWithConstraints4.json | 4 + ...AccessOnTypeParameterWithConstraints5.json | 8 + ...cessOnTypeParameterWithoutConstraints.json | 4 + ...ecurringTypeParamForContainerOfBase01.json | 3 + .../tests/tsc/recursiveIntersectionTypes.json | 1 + .../tests/tsc/recursiveMappedTypes.json | 31 + .../tsc/recursiveTypeInGenericConstraint.json | 3 + .../tests/tsc/recursiveTypeReferences1.json | 13 + ...ecursiveTypesUsedAsFunctionParameters.json | 18 + .../tests/tsc/recursiveTypesWithTypeof.json | 5 + .../tsc/restTuplesFromContextualTypes.json | 6 + ...IsNotSubtypeOfNonSpecializedSignature.json | 8 + ...ureIsSubtypeOfNonSpecializedSignature.json | 8 + .../tests/tsc/spreadObjectOrFalsy.json | 11 + .../tests/tsc/spreadTypeVariable.json | 6 + .../tests/tsc/staticIndexSignature6.json | 1 + .../tests/tsc/staticIndexers.json | 1 + .../staticMembersUsingClassTypeParameter.json | 4 + .../tsc/staticPropertyNotInClassType.json | 2 + .../tests/tsc/strictBindCallApply1.json | 6 + .../tests/tsc/strictNullChecksNoWidening.json | 1 + .../tests/tsc/strictTupleLength.json | 1 + .../stringLiteralTypeIsSubtypeOfString.json | 18 + ...teralTypesAsTypeParameterConstraint01.json | 2 + ...teralTypesAsTypeParameterConstraint02.json | 1 + .../tests/tsc/subtypesOfAny.json | 5 + .../tests/tsc/subtypesOfTypeParameter.json | 13 + ...ubtypesOfTypeParameterWithConstraints.json | 84 + ...btypesOfTypeParameterWithConstraints2.json | 32 + ...btypesOfTypeParameterWithConstraints3.json | 3 + ...btypesOfTypeParameterWithConstraints4.json | 31 + ...TypeParameterWithRecursiveConstraints.json | 60 + .../tests/tsc/subtypesOfUnion.json | 5 + .../tsc/subtypingWithCallSignatures.json | 2 + .../tsc/subtypingWithCallSignatures2.json | 26 + .../tsc/subtypingWithCallSignatures3.json | 26 + .../tsc/subtypingWithCallSignatures4.json | 44 + ...llSignaturesWithSpecializedSignatures.json | 6 + .../tsc/subtypingWithConstructSignatures.json | 2 + .../subtypingWithConstructSignatures2.json | 26 + .../subtypingWithConstructSignatures3.json | 22 + .../subtypingWithConstructSignatures4.json | 44 + .../subtypingWithConstructSignatures5.json | 22 + .../subtypingWithConstructSignatures6.json | 21 + ...ctSignaturesWithSpecializedSignatures.json | 6 + ...cCallSignaturesWithOptionalParameters.json | 65 + ...tructSignaturesWithOptionalParameters.json | 65 + .../tsc/subtypingWithNumericIndexer.json | 3 + .../tsc/subtypingWithNumericIndexer2.json | 4 + .../tsc/subtypingWithNumericIndexer3.json | 4 + .../tsc/subtypingWithNumericIndexer4.json | 2 + .../tsc/subtypingWithNumericIndexer5.json | 4 + .../tsc/subtypingWithOptionalProperties.json | 1 + .../tests/tsc/subtypingWithStringIndexer.json | 3 + .../tsc/subtypingWithStringIndexer2.json | 4 + .../tsc/subtypingWithStringIndexer3.json | 4 + .../tsc/subtypingWithStringIndexer4.json | 2 + .../superCallInConstructorWithNoBaseType.json | 1 + .../superCallParameterContextualTyping1.json | 2 + .../superCallParameterContextualTyping2.json | 2 + .../superCallParameterContextualTyping3.json | 2 + .../tests/tsc/switchStatements.json | 4 + .../switchWithConstrainedTypeVariable.json | 1 + .../tests/tsc/symbolProperty21.json | 4 + .../tests/tsc/symbolProperty22.json | 4 + .../tests/tsc/symbolProperty61.json | 3 + .../tests/tsc/syntaxErrors.json | 1 + .../tsc/taggedTemplateContextualTyping1.json | 6 + .../tsc/taggedTemplateContextualTyping2.json | 3 + ...dTemplateStringsTypeArgumentInference.json | 20 + ...mplateStringsTypeArgumentInferenceES6.json | 20 + ...emplateStringsWithOverloadResolution3.json | 11 + ...ateStringsWithOverloadResolution3_ES6.json | 11 + .../taggedTemplatesWithTypeArguments1.json | 6 + .../taggedTemplatesWithTypeArguments2.json | 6 + .../tests/tsc/templateLiteralTypes2.json | 7 + .../tests/tsc/templateLiteralTypes3.json | 27 + .../tsc/templateLiteralTypesPatterns.json | 8 + .../tsc/thisInInstanceMemberInitializer.json | 1 + .../tests/tsc/thisInInvalidContexts.json | 1 + .../thisInInvalidContextsExternalModule.json | 1 + .../tests/tsc/thisTypeAccessibility.json | 4 + .../tests/tsc/thisTypeAndConstraints.json | 4 + .../tests/tsc/thisTypeErrors2.json | 1 + ...sePropertyAndDerivedContainerOfBase01.json | 1 + .../tests/tsc/thisTypeInClasses.json | 1 + .../tests/tsc/thisTypeInFunctions.json | 1 + .../tests/tsc/thisTypeInFunctions3.json | 1 + .../tests/tsc/thisTypeInInterfaces.json | 1 + .../tests/tsc/thisTypeInObjectLiterals2.json | 26 + .../tsc/thisTypeInTaggedTemplateCall.json | 1 + .../tests/tsc/thisTypeInTuples.json | 1 + .../tests/tsc/thisTypeInTypePredicate.json | 1 + .../tests/tsc/thisTypeOptionalCall.json | 3 + .../tests/tsc/throwInEnclosingStatements.json | 2 + .../tests/tsc/throwStatements.json | 2 + ...nterfacesDifferingByTypeParameterName.json | 20 + ...terfacesDifferingByTypeParameterName2.json | 16 + ...ricInterfacesWithDifferentConstraints.json | 13 + ...facesWithTheSameNameButDifferentArity.json | 12 + .../tsc/twoInterfacesDifferentRootModule.json | 2 + .../twoInterfacesDifferentRootModule2.json | 2 + ...ergedInterfacesWithDifferingOverloads.json | 13 + ...rgedInterfacesWithDifferingOverloads2.json | 3 + .../tests/tsc/typeAliases.json | 2 + .../tests/tsc/typeAliasesForObjectTypes.json | 1 + .../tests/tsc/typeArgumentInference.json | 18 + ...eArgumentInferenceConstructSignatures.json | 18 + .../tsc/typeArgumentInferenceErrors.json | 7 + ...rgumentInferenceTransitiveConstraints.json | 3 + ...ArgumentInferenceWithClassExpression1.json | 1 + ...ArgumentInferenceWithClassExpression2.json | 1 + ...ArgumentInferenceWithClassExpression3.json | 1 + .../typeArgumentInferenceWithConstraints.json | 18 + ...ypeArgumentInferenceWithObjectLiteral.json | 4 + ...typeArgumentsWithStringLiteralTypes01.json | 4 + .../tests/tsc/typeGuardFunctionGenerics.json | 6 + .../tsc/typeGuardFunctionOfFormThis.json | 1 + .../tests/tsc/typeGuardOfFormThisMember.json | 3 + .../tsc/typeGuardOfFormTypeOfFunction.json | 4 + .../tests/tsc/typeGuardsAsAssertions.json | 5 + .../tests/tsc/typeGuardsTypeParameters.json | 4 + ...sWithInstanceOfByConstructorSignature.json | 2 + .../tests/tsc/typeInferenceWithTupleType.json | 8 + .../tests/tsc/typeOfThisGeneral.json | 2 + .../tests/tsc/typeOfThisInAccessor.json | 1 + .../tsc/typeOfThisInInstanceMember2.json | 1 + .../tsc/typeOfThisInMemberFunctions.json | 2 + .../tests/tsc/typeOfThisInStaticMembers.json | 1 + .../tests/tsc/typeOfThisInStaticMembers2.json | 1 + .../tests/tsc/typeParameterAsBaseType.json | 6 + .../tsc/typeParameterAsTypeArgument.json | 6 + ...ypeParameterAsTypeParameterConstraint.json | 4 + ...peParameterAsTypeParameterConstraint2.json | 4 + ...AsTypeParameterConstraintTransitively.json | 6 + ...sTypeParameterConstraintTransitively2.json | 6 + .../tests/tsc/typeParameterAssignability.json | 2 + .../tsc/typeParameterAssignability2.json | 16 + .../tsc/typeParameterAssignability3.json | 4 + .../tsc/typeParameterConstModifiers.json | 5609 +++++++++++++++++ .../tests/tsc/typeParameterConstModifiers.ts | 72 + ...eParameterDirectlyConstrainedToItself.json | 15 + ...eterExtendsUnionConstraintDistributed.json | 3 + ...arameterIndirectlyConstrainedToItself.json | 30 + .../tsc/typeParameterUsedAsConstraint.json | 70 + ...arameterUsedAsTypeParameterConstraint.json | 12 + ...rameterUsedAsTypeParameterConstraint2.json | 36 + ...rameterUsedAsTypeParameterConstraint3.json | 8 + ...rameterUsedAsTypeParameterConstraint4.json | 32 + ...ypeParametersAreIdenticalToThemselves.json | 41 + .../typeParametersAvailableInNestedScope.json | 3 + ...typeParametersAvailableInNestedScope2.json | 4 + ...typeParametersAvailableInNestedScope3.json | 4 + .../tests/tsc/typeQueryOnClass.json | 2 + .../tests/tsc/typeofClassWithPrivates.json | 1 + .../tests/tsc/typeofTypeParameter.json | 1 + .../tsc/typesWithDuplicateTypeParameters.json | 15 + .../tsc/undefinedAssignableToEveryType.json | 4 + .../tsc/undefinedIsSubtypeOfEverything.json | 3 + .../tsc/unionAndIntersectionInference1.json | 16 + .../tsc/unionAndIntersectionInference2.json | 2 + .../tsc/unionAndIntersectionInference3.json | 27 + ...ubtypeIfEveryConstituentTypeIsSubtype.json | 3 + .../tests/tsc/unionTypeCallSignatures2.json | 3 + .../tests/tsc/unionTypeInference.json | 16 + .../tests/tsc/unionTypeMembers.json | 4 + .../tests/tsc/unionTypesAssignability.json | 2 + .../tests/tsc/uniqueSymbols.json | 1 + .../tests/tsc/uniqueSymbolsDeclarations.json | 1 + .../tests/tsc/unknownType1.json | 17 + .../tests/tsc/unknownType2.json | 2 + .../tests/tsc/validNullAssignments.json | 1 + .../tests/tsc/validUndefinedAssignments.json | 1 + .../tests/tsc/variadicTuples1.json | 70 + .../swc_ecma_parser/tests/tsc/variance.json | 2 + .../tsc/voidParamAssignmentCompatibility.json | 1 + .../tests/tsc/wideningTuples1.json | 1 + .../tsc/wrappedAndRecursiveConstraints.json | 2 + .../tsc/wrappedAndRecursiveConstraints2.json | 1 + .../tsc/wrappedAndRecursiveConstraints3.json | 3 + .../tsc/wrappedAndRecursiveConstraints4.json | 3 + .../typeParameterConstModifiers.ts | 72 + .../typeParameterConstModifiers.ts.swc-stderr | 14 + .../async-await-null/input.ts.json | 1 + .../async-generic/input.ts.json | 1 + .../arrow-function/generic-tsx/input.ts.json | 1 + .../arrow-function/generic/input.ts.json | 1 + .../class/expression-generic/input.ts.json | 2 + .../typescript/class/generic/input.ts.json | 1 + .../class/get-generic/input.ts.json | 1 + .../members-with-modifier-names/input.ts.json | 1 + .../class/method-generic/input.ts.json | 2 + .../custom/tsx-issue-573/input.tsx.json | 1 + .../2021-02-17/case1/input.tsx.json | 2 + .../2021-02-17/case2/input.tsx.json | 2 + .../typescript/deno/dso/reflect/input.ts.json | 49 + .../es2019/from-entries/input.ts.json | 2 + .../function/annotated/input.ts.json | 1 + .../function/anonymous/input.ts.json | 1 + .../typescript/function/declare/input.ts.json | 1 + .../interface/generic/input.ts.json | 1 + .../interface/method-generic/input.ts.json | 1 + .../issue-1252/case1/input.tsx.json | 1 + .../typescript/issue-1299/ts/input.ts.json | 2 + .../typescript/issue-1299/tsx/input.tsx.json | 2 + .../issue-1505/case1/input.tsx.json | 4 + .../issue-1505/case2/input.tsx.json | 1 + .../issue-1526/case1/input.tsx.json | 1 + .../issue-1526/case3/input.tsx.json | 1 + .../typescript/issue-1526/case4/input.ts.json | 1 + .../typescript/issue-2040/case1/input.ts.json | 1 + .../typescript/issue-2040/case2/input.ts.json | 1 + .../issue-2040/case3/input.tsx.json | 1 + .../issue-2161/case1/input.tsx.json | 1 + .../tests/typescript/issue-4132/index.ts.json | 1 + .../tests/typescript/issue-6430/index.ts.json | 8 + .../regression/tsx-issue-7742/input.ts.json | 2 + .../tsx/type-parameters/input.ts.json | 1 + .../type-alias/generic-complex/input.ts.json | 1 + .../type-alias/generic/input.ts.json | 1 + .../type-arguments/whitespace/input.ts.json | 1 + .../basic/input.ts.json | 18 + .../distinguishing/input.ts.json | 22 + .../types/conditional-infer/input.ts.json | 2 + .../types/function-generic/input.ts.json | 1 + .../typescript/types/mapped/input.ts.json | 5 + .../types/object-shorthand/input.ts.json | 1 + .../variance-annotations/1/input.ts.json | 39 + .../with_jsx/input.tsx.json | 39 + crates/swc_ecma_visit/src/lib.rs | 1 + crates/swc_estree_ast/src/typescript.rs | 2 + .../src/babelify/typescript.rs | 1 + .../src/swcify/typescript.rs | 1 + 784 files changed, 11175 insertions(+), 19 deletions(-) create mode 100644 crates/swc/tests/tsc-references/typeParameterConstModifiers.1.normal.js create mode 100644 crates/swc/tests/tsc-references/typeParameterConstModifiers.2.minified.js create mode 100644 crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiers.json create mode 100644 crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiers.ts create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts create mode 100644 crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts.swc-stderr diff --git a/crates/swc/tests/tsc-references/typeParameterConstModifiers.1.normal.js b/crates/swc/tests/tsc-references/typeParameterConstModifiers.1.normal.js new file mode 100644 index 000000000000..705d745fd2fc --- /dev/null +++ b/crates/swc/tests/tsc-references/typeParameterConstModifiers.1.normal.js @@ -0,0 +1,25 @@ +//// [typeParameterConstModifiers.ts] +//! +//! x 'const' modifier can only appear on a type parameter of a function, method or class +//! ,-[41:1] +//! 41 | const fx1 = (x: T) => x; +//! 42 | const fx2 = (x: T) => x; +//! 43 | +//! 44 | interface I1 { x: T } // Error +//! : ^^^^^ +//! 45 | +//! 46 | interface I2 { +//! 47 | f(x: T): T; +//! `---- +//! +//! x 'const' modifier can only appear on a type parameter of a function, method or class +//! ,-[47:1] +//! 47 | f(x: T): T; +//! 48 | } +//! 49 | +//! 50 | type T1 = T; // Error +//! : ^^^^^ +//! 51 | +//! 52 | type T2 = (x: T) => T; +//! 53 | type T3 = { (x: T): T }; +//! `---- diff --git a/crates/swc/tests/tsc-references/typeParameterConstModifiers.2.minified.js b/crates/swc/tests/tsc-references/typeParameterConstModifiers.2.minified.js new file mode 100644 index 000000000000..705d745fd2fc --- /dev/null +++ b/crates/swc/tests/tsc-references/typeParameterConstModifiers.2.minified.js @@ -0,0 +1,25 @@ +//// [typeParameterConstModifiers.ts] +//! +//! x 'const' modifier can only appear on a type parameter of a function, method or class +//! ,-[41:1] +//! 41 | const fx1 = (x: T) => x; +//! 42 | const fx2 = (x: T) => x; +//! 43 | +//! 44 | interface I1 { x: T } // Error +//! : ^^^^^ +//! 45 | +//! 46 | interface I2 { +//! 47 | f(x: T): T; +//! `---- +//! +//! x 'const' modifier can only appear on a type parameter of a function, method or class +//! ,-[47:1] +//! 47 | f(x: T): T; +//! 48 | } +//! 49 | +//! 50 | type T1 = T; // Error +//! : ^^^^^ +//! 51 | +//! 52 | type T2 = (x: T) => T; +//! 53 | type T3 = { (x: T): T }; +//! `---- diff --git a/crates/swc_ecma_ast/src/typescript.rs b/crates/swc_ecma_ast/src/typescript.rs index 4e0441bbcf8c..c1386fc320f6 100644 --- a/crates/swc_ecma_ast/src/typescript.rs +++ b/crates/swc_ecma_ast/src/typescript.rs @@ -54,6 +54,9 @@ pub struct TsTypeParam { #[serde(default, rename = "out")] pub is_out: bool, + #[serde(default, rename = "const")] + pub is_const: bool, + #[serde(default)] pub constraint: Option>, diff --git a/crates/swc_ecma_codegen/src/typescript.rs b/crates/swc_ecma_codegen/src/typescript.rs index d9f510c6118a..2c73cb79ddf6 100644 --- a/crates/swc_ecma_codegen/src/typescript.rs +++ b/crates/swc_ecma_codegen/src/typescript.rs @@ -971,6 +971,11 @@ where fn emit_ts_type_param(&mut self, n: &TsTypeParam) -> Result { self.emit_leading_comments_of_span(n.span(), false)?; + if n.is_const { + keyword!("const"); + space!(); + } + if n.is_in { keyword!("in"); space!(); diff --git a/crates/swc_ecma_parser/src/error.rs b/crates/swc_ecma_parser/src/error.rs index feefebdf349d..262c4b2ff77b 100644 --- a/crates/swc_ecma_parser/src/error.rs +++ b/crates/swc_ecma_parser/src/error.rs @@ -255,6 +255,7 @@ pub enum SyntaxError { TS1267, TS1273(JsWord), TS1274(JsWord), + TS1277(JsWord), TS1383, TS2206, TS2207, @@ -650,6 +651,11 @@ impl SyntaxError { word ) .into(), + SyntaxError::TS1277(word) => format!( + "'{}' modifier can only appear on a type parameter of a function, method or class", + word + ) + .into(), SyntaxError::TS1383 => "Only named exports may use 'export type'.".into(), SyntaxError::TS2206 => "The 'type' modifier cannot be used on a named import when \ 'import type' is used on its import statement." diff --git a/crates/swc_ecma_parser/src/parser/class_and_fn.rs b/crates/swc_ecma_parser/src/parser/class_and_fn.rs index 58785ae94b72..1015686ddfd1 100644 --- a/crates/swc_ecma_parser/src/parser/class_and_fn.rs +++ b/crates/swc_ecma_parser/src/parser/class_and_fn.rs @@ -93,7 +93,7 @@ impl Parser { } let type_params = if p.input.syntax().typescript() { - p.try_parse_ts_type_params(true)? + p.try_parse_ts_type_params(true, true)? } else { None }; @@ -716,7 +716,7 @@ impl Parser { self.emit_err(span!(self, start), SyntaxError::TS1098); self.emit_err(span!(self, start2), SyntaxError::TS1092); } else { - let type_params = self.try_parse_ts_type_params(false)?; + let type_params = self.try_parse_ts_type_params(false, true)?; if let Some(type_params) = type_params { for param in type_params.params { @@ -1184,7 +1184,7 @@ impl Parser { trace_cur!(p, parse_fn_args_body__type_params); Ok(if is!(p, '<') { - Some(p.parse_ts_type_params(false)?) + Some(p.parse_ts_type_params(false, true)?) } else if is!(p, JSXTagStart) { debug_assert_eq!( p.input.token_context().current(), @@ -1197,7 +1197,7 @@ impl Parser { ); p.input.token_context_mut().pop(); - Some(p.parse_ts_type_params(false)?) + Some(p.parse_ts_type_params(false, true)?) } else { None }) diff --git a/crates/swc_ecma_parser/src/parser/expr.rs b/crates/swc_ecma_parser/src/parser/expr.rs index 3ad445d9c87a..c6529b18bae8 100644 --- a/crates/swc_ecma_parser/src/parser/expr.rs +++ b/crates/swc_ecma_parser/src/parser/expr.rs @@ -104,7 +104,7 @@ impl Parser { } } - let type_parameters = p.parse_ts_type_params(false)?; + let type_parameters = p.parse_ts_type_params(false, false)?; let mut arrow = p.parse_assignment_expr_base()?; match *arrow { Expr::Arrow(ArrowExpr { diff --git a/crates/swc_ecma_parser/src/parser/typescript.rs b/crates/swc_ecma_parser/src/parser/typescript.rs index 70965116ff86..d48b96558b52 100644 --- a/crates/swc_ecma_parser/src/parser/typescript.rs +++ b/crates/swc_ecma_parser/src/parser/typescript.rs @@ -37,7 +37,7 @@ impl Parser { let pos = { let modifier = match *cur!(self, true)? { Token::Word(ref w @ Word::Ident(..)) - | Token::Word(ref w @ Word::Keyword(Keyword::In)) => w.cow(), + | Token::Word(ref w @ Word::Keyword(Keyword::In | Keyword::Const)) => w.cow(), _ => return Ok(None), }; @@ -369,11 +369,16 @@ impl Parser { } /// `tsParseTypeParameter` - fn parse_ts_type_param(&mut self, allow_modifier: bool) -> PResult { + fn parse_ts_type_param( + &mut self, + permit_in_out: bool, + permit_const: bool, + ) -> PResult { debug_assert!(self.input.syntax().typescript()); let mut is_in = false; let mut is_out = false; + let mut is_const = false; let start = cur_pos!(self); @@ -392,8 +397,18 @@ impl Parser { false, )? { match modifer { + "const" => { + if !permit_const { + self.emit_err( + self.input.prev_span(), + SyntaxError::TS1277(js_word!("const")), + ); + } else { + is_const = true; + } + } "in" => { - if !allow_modifier { + if !permit_in_out { self.emit_err(self.input.prev_span(), SyntaxError::TS1274(js_word!("in"))); } else if is_in { self.emit_err(self.input.prev_span(), SyntaxError::TS1030(js_word!("in"))); @@ -407,7 +422,7 @@ impl Parser { } } "out" => { - if !allow_modifier { + if !permit_in_out { self.emit_err(self.input.prev_span(), SyntaxError::TS1274(js_word!("out"))); } else if is_out { self.emit_err(self.input.prev_span(), SyntaxError::TS1030(js_word!("out"))); @@ -428,6 +443,7 @@ impl Parser { name, is_in, is_out, + is_const, constraint, default, }) @@ -436,7 +452,8 @@ impl Parser { /// `tsParseTypeParameter` pub(super) fn parse_ts_type_params( &mut self, - allow_modifier: bool, + permit_in_out: bool, + permit_const: bool, ) -> PResult> { self.in_type().parse_with(|p| { p.ts_in_no_context(|p| { @@ -449,7 +466,7 @@ impl Parser { let params = p.parse_ts_bracketed_list( ParsingContext::TypeParametersOrArguments, - |p| p.parse_ts_type_param(allow_modifier), // bracket + |p| p.parse_ts_type_param(permit_in_out, permit_const), // bracket false, // skip_first_token true, @@ -1066,7 +1083,7 @@ impl Parser { _ => {} } - let type_params = self.try_parse_ts_type_params(true)?; + let type_params = self.try_parse_ts_type_params(true, false)?; let extends = if eat!(self, "extends") { self.parse_ts_heritage_clause()? @@ -1108,7 +1125,7 @@ impl Parser { debug_assert!(self.input.syntax().typescript()); let id = self.parse_ident_name()?; - let type_params = self.try_parse_ts_type_params(true)?; + let type_params = self.try_parse_ts_type_params(true, false)?; let type_ann = self.expect_then_parse_ts_type(&tok!('='), "=")?; expect!(self, ';'); Ok(Box::new(TsTypeAliasDecl { @@ -1269,7 +1286,7 @@ impl Parser { } // ----- inlined self.tsFillSignature(tt.colon, node); - let type_params = self.try_parse_ts_type_params(false)?; + let type_params = self.try_parse_ts_type_params(false, true)?; expect!(self, '('); let params = self.parse_ts_binding_list_for_signature()?; let type_ann = if is!(self, ':') { @@ -1406,7 +1423,7 @@ impl Parser { let optional = eat!(self, '?'); if !readonly && is_one_of!(self, '(', '<') { - let type_params = self.try_parse_ts_type_params(false)?; + let type_params = self.try_parse_ts_type_params(false, true)?; expect!(self, '('); let params = self.parse_ts_binding_list_for_signature()?; let type_ann = if is!(self, ':') { @@ -1606,6 +1623,7 @@ impl Parser { name, is_in: false, is_out: false, + is_const: false, constraint, default: None, }) @@ -1817,7 +1835,7 @@ impl Parser { } // ----- inlined `self.tsFillSignature(tt.arrow, node)` - let type_params = self.try_parse_ts_type_params(false)?; + let type_params = self.try_parse_ts_type_params(false, true)?; expect!(self, '('); let params = self.parse_ts_binding_list_for_signature()?; let type_ann = self.parse_ts_type_or_type_predicate_ann(&tok!("=>"))?; @@ -1985,14 +2003,17 @@ impl Parser { /// `tsTryParseTypeParameters` pub(super) fn try_parse_ts_type_params( &mut self, - allow_modifier: bool, + permit_in_out: bool, + permit_const: bool, ) -> PResult>> { if !cfg!(feature = "typescript") { return Ok(None); } if is!(self, '<') { - return self.parse_ts_type_params(allow_modifier).map(Some); + return self + .parse_ts_type_params(permit_in_out, permit_const) + .map(Some); } Ok(None) } @@ -2251,6 +2272,7 @@ impl Parser { name: type_param_name, is_in: false, is_out: false, + is_const: false, constraint, default: None, }; @@ -2604,7 +2626,7 @@ impl Parser { let res = if is_one_of!(self, '<', JSXTagStart) { self.try_parse_ts(|p| { - let type_params = p.parse_ts_type_params(false)?; + let type_params = p.parse_ts_type_params(false, false)?; // Don't use overloaded parseFunctionParams which would look for "<" again. expect!(p, '('); let params: Vec = p 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 63d5fee38b25..70a7506bc5ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/1.0lib-noErrors.json @@ -19821,6 +19821,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -20058,6 +20059,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -22339,6 +22341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -23191,6 +23194,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -23802,6 +23806,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -24120,6 +24125,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -24256,6 +24262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -24423,6 +24430,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -24559,6 +24567,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.json index 5a20c9213992..c66038de00ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModuleMemberThatUsesClassTypeParameter.json @@ -156,6 +156,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -425,6 +426,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -669,6 +671,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -848,6 +851,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1109,6 +1113,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.json index 27512ebbde32..1a41321dd551 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndGenericClassStaticFunctionOfTheSameName.json @@ -236,6 +236,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -280,6 +281,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -492,6 +494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.json index b4bad4c5a68c..0ae1520bca5b 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedGenericFunctionAndNonGenericClassStaticFunctionOfTheSameName.json @@ -239,6 +239,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -451,6 +452,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.json b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.json index a8b8be374d2f..5e84a08e1865 100644 --- a/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.json +++ b/crates/swc_ecma_parser/tests/tsc/ClassAndModuleThatMergeWithModulesExportedStaticFunctionUsingClassPrivateStatics.json @@ -258,6 +258,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -512,6 +513,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json index fd59bc3cace3..1b1531a6713f 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportClassWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json @@ -700,6 +700,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/ExportClassWithInaccessibleTypeInTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/ExportClassWithInaccessibleTypeInTypeParameterConstraint.json index cf7526aa58c2..b4e3d28814ac 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportClassWithInaccessibleTypeInTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportClassWithInaccessibleTypeInTypeParameterConstraint.json @@ -856,6 +856,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json index 43dc38df75ce..3486ceb036ae 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithAccessibleTypesInTypeParameterConstraintsClassHeritageListMemberTypeAnnotations.json @@ -573,6 +573,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json index cba347f3e051..54ae8c933b39 100644 --- a/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/ExportInterfaceWithInaccessibleTypeInTypeParameterConstraint.json @@ -565,6 +565,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/MemberFunctionDeclaration7_es6.json b/crates/swc_ecma_parser/tests/tsc/MemberFunctionDeclaration7_es6.json index 781a77c0611a..be131554662a 100644 --- a/crates/swc_ecma_parser/tests/tsc/MemberFunctionDeclaration7_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/MemberFunctionDeclaration7_es6.json @@ -89,6 +89,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedClasses.json b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedClasses.json index be87dcc98866..e6aa6f6d47a2 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedClasses.json @@ -325,6 +325,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -347,6 +348,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -633,6 +635,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -655,6 +658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedFunctions.json b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedFunctions.json index 3d19dae2eee4..2e72b261d277 100644 --- a/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/ModuleWithExportedAndNonExportedFunctions.json @@ -259,6 +259,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -281,6 +282,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -526,6 +528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -548,6 +551,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -845,6 +849,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -867,6 +872,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json index 53d14e37054d..a877fde545ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedAndNonExportedLocalVarsOfTheSameName.json @@ -401,6 +401,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json index eb9da1382d69..7d4f51353935 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesThatMergeEachWithExportedLocalVarsOfTheSameName.json @@ -408,6 +408,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json index 02ab1570014a..318f03e7e211 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndDifferentCommonRoot.json @@ -435,6 +435,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json index 319c1d91af9e..337be9288ccb 100644 --- a/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json +++ b/crates/swc_ecma_parser/tests/tsc/TwoInternalModulesWithTheSameNameAndSameCommonRoot.json @@ -401,6 +401,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json index d53958feca70..a5bee4b291f3 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty8.json @@ -135,6 +135,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -242,6 +243,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -494,6 +496,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -767,6 +770,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -864,6 +868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json index d25a9343b0d2..04d2633e58bc 100644 --- a/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json +++ b/crates/swc_ecma_parser/tests/tsc/accessorsOverrideProperty9.json @@ -58,6 +58,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsTypeLiteral", @@ -213,6 +214,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -245,6 +247,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1194,6 +1197,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/additionOperatorWithConstrainedTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/additionOperatorWithConstrainedTypeParameter.json index b6a8dc04b8d1..e47347de7030 100644 --- a/crates/swc_ecma_parser/tests/tsc/additionOperatorWithConstrainedTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/additionOperatorWithConstrainedTypeParameter.json @@ -341,6 +341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -418,6 +419,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -838,6 +840,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -915,6 +918,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/additionOperatorWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/additionOperatorWithTypeParameter.json index d6778fb68729..17013dd9b754 100644 --- a/crates/swc_ecma_parser/tests/tsc/additionOperatorWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/additionOperatorWithTypeParameter.json @@ -1834,6 +1834,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1856,6 +1857,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json b/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json index b10c5540e3a6..c06211668b33 100644 --- a/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/ambientDeclarations.json @@ -911,6 +911,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json index 20c410387f17..a9a33fed901b 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignabilityInInheritance.json @@ -2628,6 +2628,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3311,6 +3312,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3438,6 +3440,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json index 8bc8dc802249..3206fe35df6f 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType.json @@ -1535,6 +1535,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2032,6 +2033,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2054,6 +2056,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2076,6 +2079,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json index 2a16522d58fc..c1d44869c759 100644 --- a/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json +++ b/crates/swc_ecma_parser/tests/tsc/anyAssignableToEveryType2.json @@ -1553,6 +1553,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2014,6 +2015,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2866,6 +2868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3035,6 +3038,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3057,6 +3061,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/apparentTypeSubtyping.json b/crates/swc_ecma_parser/tests/tsc/apparentTypeSubtyping.json index 2cdf8a0afc27..607d918ffd6a 100644 --- a/crates/swc_ecma_parser/tests/tsc/apparentTypeSubtyping.json +++ b/crates/swc_ecma_parser/tests/tsc/apparentTypeSubtyping.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -251,6 +252,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -528,6 +530,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/apparentTypeSupertype.json b/crates/swc_ecma_parser/tests/tsc/apparentTypeSupertype.json index 35d2586f4d47..da3d516f71a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/apparentTypeSupertype.json +++ b/crates/swc_ecma_parser/tests/tsc/apparentTypeSupertype.json @@ -192,6 +192,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithTypeParameter.json index fdfc3854b5e5..d2f6ffd9b7e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/arithmeticOperatorWithTypeParameter.json @@ -7067,6 +7067,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/arrayLiteralInference.json b/crates/swc_ecma_parser/tests/tsc/arrayLiteralInference.json index 16d3d8d5f78c..bae877569598 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrayLiteralInference.json +++ b/crates/swc_ecma_parser/tests/tsc/arrayLiteralInference.json @@ -1087,6 +1087,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/arrayLiteralsWithRecursiveGenerics.json b/crates/swc_ecma_parser/tests/tsc/arrayLiteralsWithRecursiveGenerics.json index 629fa68eb403..7e9f1238b2e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrayLiteralsWithRecursiveGenerics.json +++ b/crates/swc_ecma_parser/tests/tsc/arrayLiteralsWithRecursiveGenerics.json @@ -222,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -344,6 +345,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -596,6 +598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/arrayOfFunctionTypes3.json b/crates/swc_ecma_parser/tests/tsc/arrayOfFunctionTypes3.json index 148d4395a6bb..c3522eed30da 100644 --- a/crates/swc_ecma_parser/tests/tsc/arrayOfFunctionTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/arrayOfFunctionTypes3.json @@ -1287,6 +1287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1488,6 +1489,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1744,6 +1746,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asOperatorAmbiguity.json b/crates/swc_ecma_parser/tests/tsc/asOperatorAmbiguity.json index b2c0119f357a..a766fa07a26d 100644 --- a/crates/swc_ecma_parser/tests/tsc/asOperatorAmbiguity.json +++ b/crates/swc_ecma_parser/tests/tsc/asOperatorAmbiguity.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json b/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json index 09d22da26190..442e660e5874 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/assignAnyToEveryType.json @@ -1149,6 +1149,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1435,6 +1436,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json b/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json index 1eeba18c5528..7d8fa258b5eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/assignEveryTypeToAny.json @@ -1566,6 +1566,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1721,6 +1722,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures.json index 7e57088f1703..6534faffadb9 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures.json @@ -845,6 +845,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1124,6 +1125,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json index b30c172be9a0..264a41831593 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures2.json @@ -991,6 +991,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1438,6 +1439,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json index 0f9d6c5e2db1..fee6c9792b35 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures3.json @@ -3292,6 +3292,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3414,6 +3415,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4239,6 +4241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4469,6 +4472,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4689,6 +4693,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4948,6 +4953,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4970,6 +4976,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5248,6 +5255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5270,6 +5278,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5548,6 +5557,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5588,6 +5598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5884,6 +5895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5924,6 +5936,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6369,6 +6382,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6409,6 +6423,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6927,6 +6942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6967,6 +6983,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7285,6 +7302,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7562,6 +7580,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7867,6 +7886,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8228,6 +8248,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8589,6 +8610,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8811,6 +8833,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9041,6 +9064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9335,6 +9359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9621,6 +9646,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json index 3944502f5622..969d7bf01c01 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures4.json @@ -2580,6 +2580,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2704,6 +2705,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2892,6 +2894,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3016,6 +3019,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3187,6 +3191,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3209,6 +3214,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3495,6 +3501,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3535,6 +3542,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3575,6 +3583,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4052,6 +4061,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4092,6 +4102,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4410,6 +4421,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4687,6 +4699,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5020,6 +5033,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5381,6 +5395,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5696,6 +5711,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5982,6 +5998,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6268,6 +6285,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6518,6 +6536,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6672,6 +6691,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6892,6 +6912,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7036,6 +7057,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json index 71cd34091536..c1333045fd68 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures5.json @@ -427,6 +427,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -581,6 +582,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -725,6 +727,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -898,6 +901,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -920,6 +924,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1112,6 +1117,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1134,6 +1140,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1336,6 +1343,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1672,6 +1680,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1911,6 +1920,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2158,6 +2168,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2429,6 +2440,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2617,6 +2629,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2823,6 +2836,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2947,6 +2961,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3135,6 +3150,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3259,6 +3275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3430,6 +3447,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3660,6 +3678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3880,6 +3899,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4139,6 +4159,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4161,6 +4182,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4429,6 +4451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4451,6 +4474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4729,6 +4753,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4769,6 +4794,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5181,6 +5207,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5203,6 +5230,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5518,6 +5546,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5540,6 +5569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5863,6 +5893,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6149,6 +6180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6403,6 +6435,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json index f3f51c2117b2..75d6246a8e10 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithCallSignatures6.json @@ -451,6 +451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -597,6 +598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -733,6 +735,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -898,6 +901,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -920,6 +924,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1104,6 +1109,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1126,6 +1132,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1320,6 +1327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1648,6 +1656,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1879,6 +1888,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2118,6 +2128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2348,6 +2359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2613,6 +2625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2868,6 +2881,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3162,6 +3176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3184,6 +3199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3487,6 +3503,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3509,6 +3526,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3938,6 +3956,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3960,6 +3979,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4310,6 +4330,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json index c28bf02145fe..f561216196d1 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures3.json @@ -3306,6 +3306,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3428,6 +3429,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4255,6 +4257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4486,6 +4489,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4707,6 +4711,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4967,6 +4972,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4989,6 +4995,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5268,6 +5275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5290,6 +5298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5569,6 +5578,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5609,6 +5619,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5906,6 +5917,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5946,6 +5958,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6392,6 +6405,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6432,6 +6446,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6951,6 +6966,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6991,6 +7007,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7310,6 +7327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7588,6 +7606,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7894,6 +7913,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8256,6 +8276,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8618,6 +8639,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8841,6 +8863,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9072,6 +9095,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9368,6 +9392,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9656,6 +9681,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json index dcde9a9e289e..808ccef46173 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures4.json @@ -2587,6 +2587,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2711,6 +2712,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2899,6 +2901,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3023,6 +3026,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3194,6 +3198,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3216,6 +3221,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3503,6 +3509,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3543,6 +3550,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3583,6 +3591,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4061,6 +4070,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4101,6 +4111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4420,6 +4431,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4698,6 +4710,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5032,6 +5045,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5394,6 +5408,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5710,6 +5725,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5997,6 +6013,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6284,6 +6301,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6535,6 +6553,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6690,6 +6709,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6911,6 +6931,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7056,6 +7077,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json index 37b4b71e5184..5b99bbc7b06f 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures5.json @@ -427,6 +427,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -582,6 +583,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -727,6 +729,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -901,6 +904,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -923,6 +927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1117,6 +1122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1139,6 +1145,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1343,6 +1350,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1680,6 +1688,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1920,6 +1929,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2168,6 +2178,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2441,6 +2452,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2630,6 +2642,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2836,6 +2849,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2960,6 +2974,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3148,6 +3163,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3272,6 +3288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3443,6 +3460,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3674,6 +3692,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3895,6 +3914,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4155,6 +4175,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4177,6 +4198,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4447,6 +4469,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4469,6 +4492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4749,6 +4773,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4789,6 +4814,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5202,6 +5228,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5224,6 +5251,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5540,6 +5568,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5562,6 +5591,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5886,6 +5916,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6174,6 +6205,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6429,6 +6461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json index 0ece1b289716..b863e7b10a11 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithConstructSignatures6.json @@ -451,6 +451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -598,6 +599,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -735,6 +737,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -901,6 +904,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -923,6 +927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1108,6 +1113,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1130,6 +1136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1325,6 +1332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1654,6 +1662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1886,6 +1895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2126,6 +2136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2357,6 +2368,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2623,6 +2635,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2879,6 +2892,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3174,6 +3188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3196,6 +3211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3500,6 +3516,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3522,6 +3539,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3952,6 +3970,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3974,6 +3993,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4325,6 +4345,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json index 8126fbffca64..c645b431d62a 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures.json @@ -112,6 +112,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -314,6 +315,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures2.json index 22c7053cc730..8c2a61c1a811 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures2.json @@ -191,6 +191,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -377,6 +378,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures3.json index 48c82044cdbc..2190a3861a2b 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures3.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -299,6 +301,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -414,6 +417,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -499,6 +503,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -694,6 +699,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -779,6 +785,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1011,6 +1018,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json index 5d3377ecef99..50a802371758 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignatures4.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -225,6 +226,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -407,6 +409,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.json index ca019dce66b9..ef3c34652235 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithGenericCallSignaturesWithOptionalParameters.json @@ -2556,6 +2556,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2674,6 +2675,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2816,6 +2818,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2958,6 +2961,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3137,6 +3141,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3316,6 +3321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4008,6 +4014,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6046,6 +6053,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6163,6 +6171,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6305,6 +6314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6447,6 +6457,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6626,6 +6637,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6805,6 +6817,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6968,6 +6981,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7101,6 +7115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7234,6 +7249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7329,6 +7345,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7462,6 +7479,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7595,6 +7613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7690,6 +7709,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7823,6 +7843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7956,6 +7977,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8126,6 +8148,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8221,6 +8244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8391,6 +8415,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8524,6 +8549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8694,6 +8720,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8789,6 +8816,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8959,6 +8987,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9092,6 +9121,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9262,6 +9292,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer.json index ef9ba31af58b..cf5a2bc819f3 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer.json @@ -941,6 +941,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1819,6 +1820,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer2.json index c84e1467b42a..39d9fee08648 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer2.json @@ -874,6 +874,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1842,6 +1843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer3.json index ec78f4bd2f0c..60ebcd8d7f11 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithNumericIndexer3.json @@ -1043,6 +1043,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1599,6 +1600,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer.json index 9d85a5cb2a5e..4878b974da59 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer.json @@ -941,6 +941,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2228,6 +2229,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer2.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer2.json index 7f41af3952cc..f94c7f18b014 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer2.json @@ -874,6 +874,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2266,6 +2267,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer3.json b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer3.json index 3885f9de0674..40b23bcc7d3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentCompatWithStringIndexer3.json @@ -646,6 +646,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1000,6 +1001,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json b/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json index 038287f97015..c8dad43549ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentGenericLookupTypeNarrowing.json @@ -66,6 +66,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsLiteralType", "span": { @@ -318,6 +319,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -673,6 +675,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsLiteralType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json b/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json index 328c15a0fe60..53ebadc0b6ad 100644 --- a/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/assignmentTypeNarrowing.json @@ -962,6 +962,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncAliasReturnType_es5.json b/crates/swc_ecma_parser/tests/tsc/asyncAliasReturnType_es5.json index 1faffbacd032..b04d83bf403d 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncAliasReturnType_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncAliasReturnType_es5.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncAliasReturnType_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncAliasReturnType_es6.json index b4c4f5c1a561..f4dde1db5902 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncAliasReturnType_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncAliasReturnType_es6.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncAwait_es2017.json b/crates/swc_ecma_parser/tests/tsc/asyncAwait_es2017.json index 23a5c0d7682e..690223999494 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncAwait_es2017.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncAwait_es2017.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncAwait_es5.json b/crates/swc_ecma_parser/tests/tsc/asyncAwait_es5.json index 3f02d4a011fd..d65108a03f97 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncAwait_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncAwait_es5.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncAwait_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncAwait_es6.json index 34d4ac83b1a7..1f8b98beadbc 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncAwait_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncAwait_es6.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncGeneratorGenericNonWrappedReturn.json b/crates/swc_ecma_parser/tests/tsc/asyncGeneratorGenericNonWrappedReturn.json index 455311127da9..b7c4b60b3ebf 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncGeneratorGenericNonWrappedReturn.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncGeneratorGenericNonWrappedReturn.json @@ -137,6 +137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncImportedPromise_es5.json b/crates/swc_ecma_parser/tests/tsc/asyncImportedPromise_es5.json index 6d3549a677b8..baa78c4bb8d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncImportedPromise_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncImportedPromise_es5.json @@ -71,6 +71,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -243,6 +244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncImportedPromise_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncImportedPromise_es6.json index ac7efa7ab4a2..92998b621e4b 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncImportedPromise_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncImportedPromise_es6.json @@ -71,6 +71,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -243,6 +244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncQualifiedReturnType_es5.json b/crates/swc_ecma_parser/tests/tsc/asyncQualifiedReturnType_es5.json index 16730c49c5d1..1a54699476ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncQualifiedReturnType_es5.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncQualifiedReturnType_es5.json @@ -98,6 +98,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/asyncQualifiedReturnType_es6.json b/crates/swc_ecma_parser/tests/tsc/asyncQualifiedReturnType_es6.json index ed1016caffe1..55c06374b9fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/asyncQualifiedReturnType_es6.json +++ b/crates/swc_ecma_parser/tests/tsc/asyncQualifiedReturnType_es6.json @@ -98,6 +98,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/await_incorrectThisType.json b/crates/swc_ecma_parser/tests/tsc/await_incorrectThisType.json index 3aa39de95ca7..850e9ab337eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/await_incorrectThisType.json +++ b/crates/swc_ecma_parser/tests/tsc/await_incorrectThisType.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -228,6 +230,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -390,6 +393,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -661,6 +665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -889,6 +894,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1202,6 +1208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1498,6 +1505,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2634,6 +2642,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsTypeReference", @@ -2674,6 +2683,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", @@ -2809,6 +2819,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2831,6 +2842,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json index d051fb744f1a..9284940e9469 100644 --- a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json +++ b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions.json @@ -1866,6 +1866,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1888,6 +1889,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions2.json b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions2.json index 67db19b90db0..e070cea1040e 100644 --- a/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions2.json +++ b/crates/swc_ecma_parser/tests/tsc/bestCommonTypeOfConditionalExpressions2.json @@ -752,6 +752,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -774,6 +775,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -978,6 +980,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1018,6 +1021,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1222,6 +1226,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1262,6 +1267,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1302,6 +1308,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/bigintMissingES2019.json b/crates/swc_ecma_parser/tests/tsc/bigintMissingES2019.json index 8d661cf14008..a5f58e9f8883 100644 --- a/crates/swc_ecma_parser/tests/tsc/bigintMissingES2019.json +++ b/crates/swc_ecma_parser/tests/tsc/bigintMissingES2019.json @@ -56,6 +56,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -78,6 +79,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/bigintMissingES2020.json b/crates/swc_ecma_parser/tests/tsc/bigintMissingES2020.json index 8d661cf14008..a5f58e9f8883 100644 --- a/crates/swc_ecma_parser/tests/tsc/bigintMissingES2020.json +++ b/crates/swc_ecma_parser/tests/tsc/bigintMissingES2020.json @@ -56,6 +56,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -78,6 +79,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/bigintMissingESNext.json b/crates/swc_ecma_parser/tests/tsc/bigintMissingESNext.json index 8d661cf14008..a5f58e9f8883 100644 --- a/crates/swc_ecma_parser/tests/tsc/bigintMissingESNext.json +++ b/crates/swc_ecma_parser/tests/tsc/bigintMissingESNext.json @@ -56,6 +56,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -78,6 +79,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json b/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json index ea17747f42c8..9f850665ab76 100644 --- a/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json +++ b/crates/swc_ecma_parser/tests/tsc/bivariantInferences.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -261,6 +262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callChain.3.json b/crates/swc_ecma_parser/tests/tsc/callChain.3.json index 3703c0cc3707..9099b2158374 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChain.3.json +++ b/crates/swc_ecma_parser/tests/tsc/callChain.3.json @@ -56,6 +56,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -293,6 +294,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callChain.json b/crates/swc_ecma_parser/tests/tsc/callChain.json index a8e125c1753c..695fe1990bde 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChain.json +++ b/crates/swc_ecma_parser/tests/tsc/callChain.json @@ -3166,6 +3166,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3470,6 +3471,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callChainInference.json b/crates/swc_ecma_parser/tests/tsc/callChainInference.json index f8b1173ba3db..d027894031ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/callChainInference.json +++ b/crates/swc_ecma_parser/tests/tsc/callChainInference.json @@ -183,6 +183,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json index abc494089077..0510593a55eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithIncorrectNumberOfTypeArguments.json @@ -174,6 +174,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -196,6 +197,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -607,6 +609,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -629,6 +632,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1056,6 +1060,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1078,6 +1083,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1498,6 +1504,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1520,6 +1527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2029,6 +2037,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2051,6 +2060,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2599,6 +2609,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2621,6 +2632,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2958,6 +2970,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2980,6 +2993,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json index 966a63003510..dc4facde07db 100644 --- a/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/callGenericFunctionWithZeroTypeArguments.json @@ -128,6 +128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -356,6 +357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -600,6 +602,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -828,6 +831,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1118,6 +1122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1456,6 +1461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1611,6 +1617,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json index ff5e61711886..8a4d3a9136b7 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance.json @@ -476,6 +476,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -815,6 +816,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1185,6 +1187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1565,6 +1568,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1811,6 +1815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2138,6 +2143,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json index 15a7147a5f4c..b254b7e0510a 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance2.json @@ -3196,6 +3196,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3318,6 +3319,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4170,6 +4172,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4316,6 +4319,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4452,6 +4456,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4627,6 +4632,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4649,6 +4655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4843,6 +4850,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4865,6 +4873,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5059,6 +5068,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5099,6 +5109,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5311,6 +5322,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5351,6 +5363,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5712,6 +5725,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5752,6 +5766,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6186,6 +6201,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6226,6 +6242,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6460,6 +6477,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6653,6 +6671,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6874,6 +6893,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7151,6 +7171,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7428,6 +7449,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7450,6 +7472,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7588,6 +7611,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7734,6 +7758,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7944,6 +7969,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8146,6 +8172,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json index f7a277086c72..8295cde91dc3 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance3.json @@ -2532,6 +2532,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2656,6 +2657,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2844,6 +2846,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2968,6 +2971,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3182,6 +3186,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3204,6 +3209,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3296,6 +3302,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3318,6 +3325,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3676,6 +3684,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3716,6 +3725,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3756,6 +3766,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4200,6 +4211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4240,6 +4252,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4525,6 +4538,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4769,6 +4783,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5069,6 +5084,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5397,6 +5413,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5679,6 +5696,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5932,6 +5950,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6185,6 +6204,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6382,6 +6402,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6579,6 +6600,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6746,6 +6768,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6933,6 +6956,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json index e113d7c10567..3a30b034f0e1 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance4.json @@ -451,6 +451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -597,6 +598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -733,6 +735,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -898,6 +901,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -920,6 +924,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1104,6 +1109,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1126,6 +1132,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1320,6 +1327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1648,6 +1656,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1879,6 +1888,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2118,6 +2128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2381,6 +2392,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2569,6 +2581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2767,6 +2780,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2891,6 +2905,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3079,6 +3094,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3203,6 +3219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3417,6 +3434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3563,6 +3581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3699,6 +3718,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3874,6 +3894,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3896,6 +3917,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4080,6 +4102,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4102,6 +4125,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4296,6 +4320,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4336,6 +4361,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4664,6 +4690,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4686,6 +4713,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4917,6 +4945,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4939,6 +4968,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5178,6 +5208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5380,6 +5411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5550,6 +5582,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json index 5f61afa3d919..5cd05d9b610c 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance5.json @@ -3046,6 +3046,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3243,6 +3244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3389,6 +3391,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3525,6 +3528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3700,6 +3704,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3722,6 +3727,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3916,6 +3922,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3938,6 +3945,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4132,6 +4140,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4172,6 +4181,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4384,6 +4394,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4424,6 +4435,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4785,6 +4797,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4825,6 +4838,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5259,6 +5273,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5299,6 +5314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5533,6 +5549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5726,6 +5743,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5947,6 +5965,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6224,6 +6243,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6501,6 +6521,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6523,6 +6544,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json index 84f53c106e37..1c641367666f 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureAssignabilityInInheritance6.json @@ -451,6 +451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -597,6 +598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -733,6 +735,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -898,6 +901,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -920,6 +924,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1104,6 +1109,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1126,6 +1132,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1320,6 +1327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1648,6 +1656,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1879,6 +1888,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2118,6 +2128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2228,6 +2239,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2425,6 +2437,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2612,6 +2625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2801,6 +2815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2974,6 +2989,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3048,6 +3064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3240,6 +3257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3324,6 +3342,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3632,6 +3651,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3716,6 +3736,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json b/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json index a6e2efbd8c6a..048920b2675d 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignatureWithoutReturnTypeAnnotationInference.json @@ -549,6 +549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType.json index 19d23e230811..3380ca472ffa 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType.json @@ -202,6 +202,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -298,6 +299,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -425,6 +427,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -521,6 +524,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -575,6 +579,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1013,6 +1018,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1109,6 +1115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json index a033aaea684c..f677b25b6d81 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType2.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType3.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType3.json index 5c7adee44163..7137922a9c8c 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType3.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesThatDifferOnlyByReturnType3.json @@ -223,6 +223,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -340,6 +341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json index df5cb8cae42c..cf2ae5ad878d 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithAccessibilityModifiersOnParameters.json @@ -510,6 +510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1153,6 +1154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1546,6 +1548,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1945,6 +1948,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2492,6 +2496,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json index e44f4c9bdaec..bd55357661a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/callSignaturesWithDuplicateParameters.json @@ -510,6 +510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1153,6 +1154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1546,6 +1548,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1945,6 +1948,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2492,6 +2496,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoid.json b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoid.json index ee6c563a43f2..580d870091b6 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoid.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoid.json @@ -191,6 +191,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1112,6 +1113,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3049,6 +3051,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json index 91a8a232e56c..4cdae99c956d 100644 --- a/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json +++ b/crates/swc_ecma_parser/tests/tsc/callWithMissingVoidUndefinedUnknownAnyInJs.json @@ -367,6 +367,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTag4.json b/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTag4.json index e7bc00638c3d..993ef6a04c68 100644 --- a/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTag4.json +++ b/crates/swc_ecma_parser/tests/tsc/checkJsdocTypeTag4.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/circularIndexedAccessErrors.json b/crates/swc_ecma_parser/tests/tsc/circularIndexedAccessErrors.json index 50722efb8238..8bf9ee81065f 100644 --- a/crates/swc_ecma_parser/tests/tsc/circularIndexedAccessErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/circularIndexedAccessErrors.json @@ -159,6 +159,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -559,6 +560,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -745,6 +747,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1393,6 +1396,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/classAbstractGeneric.json b/crates/swc_ecma_parser/tests/tsc/classAbstractGeneric.json index 2b5f1899d30e..fd826e3b8c4a 100644 --- a/crates/swc_ecma_parser/tests/tsc/classAbstractGeneric.json +++ b/crates/swc_ecma_parser/tests/tsc/classAbstractGeneric.json @@ -260,6 +260,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -326,6 +327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -420,6 +422,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -649,6 +652,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -837,6 +841,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1106,6 +1111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility.json b/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility.json index dfafac24ea5e..cdac73f4fda7 100644 --- a/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility.json +++ b/crates/swc_ecma_parser/tests/tsc/classConstructorAccessibility.json @@ -652,6 +652,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -790,6 +791,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -928,6 +930,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendingClass.json b/crates/swc_ecma_parser/tests/tsc/classExtendingClass.json index c1b5483f906f..4bd03d8e7f86 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendingClass.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendingClass.json @@ -848,6 +848,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -892,6 +893,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1004,6 +1006,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json b/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json index 432cff2f6bc2..e72cb96f6d44 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendingClassLikeType.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -548,6 +550,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -738,6 +741,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -928,6 +932,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -950,6 +955,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendsItself.json b/crates/swc_ecma_parser/tests/tsc/classExtendsItself.json index 66e22499f6c6..15a3ab4dcdcb 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendsItself.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendsItself.json @@ -99,6 +99,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -193,6 +194,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly.json b/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly.json index 2bd75b471a2b..e57dc70629c6 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly.json @@ -363,6 +363,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -513,6 +514,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -663,6 +665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly2.json b/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly2.json index 7d5d47331473..6225b066b3d7 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly2.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly2.json @@ -520,6 +520,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -704,6 +705,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -910,6 +912,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly3.json b/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly3.json index f450d534d935..32a7b36b72dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly3.json +++ b/crates/swc_ecma_parser/tests/tsc/classExtendsItselfIndirectly3.json @@ -363,6 +363,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -513,6 +514,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -663,6 +665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classIsSubtypeOfBaseType.json b/crates/swc_ecma_parser/tests/tsc/classIsSubtypeOfBaseType.json index 5640178cc6b6..0f805d78269a 100644 --- a/crates/swc_ecma_parser/tests/tsc/classIsSubtypeOfBaseType.json +++ b/crates/swc_ecma_parser/tests/tsc/classIsSubtypeOfBaseType.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classWithBaseClassButNoConstructor.json b/crates/swc_ecma_parser/tests/tsc/classWithBaseClassButNoConstructor.json index a149f9761b21..d86172dc539d 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithBaseClassButNoConstructor.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithBaseClassButNoConstructor.json @@ -468,6 +468,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -490,6 +491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -612,6 +614,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -634,6 +637,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -963,6 +967,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -985,6 +990,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classWithConstructors.json b/crates/swc_ecma_parser/tests/tsc/classWithConstructors.json index 4b84710ec1a8..c2da808ccfb9 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithConstructors.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithConstructors.json @@ -1017,6 +1017,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1444,6 +1445,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1466,6 +1468,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1729,6 +1732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1751,6 +1755,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classWithNoConstructorOrBaseClass.json b/crates/swc_ecma_parser/tests/tsc/classWithNoConstructorOrBaseClass.json index e71fcec78322..5d47c267c7c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithNoConstructorOrBaseClass.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithNoConstructorOrBaseClass.json @@ -332,6 +332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -354,6 +355,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classWithOptionalParameter.json b/crates/swc_ecma_parser/tests/tsc/classWithOptionalParameter.json index 9b12434aff04..1e0c179be305 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithOptionalParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithOptionalParameter.json @@ -322,6 +322,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classWithTwoConstructorDefinitions.json b/crates/swc_ecma_parser/tests/tsc/classWithTwoConstructorDefinitions.json index 22e7d946e1d4..40d80a6a6a23 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithTwoConstructorDefinitions.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithTwoConstructorDefinitions.json @@ -364,6 +364,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/classWithoutExplicitConstructor.json b/crates/swc_ecma_parser/tests/tsc/classWithoutExplicitConstructor.json index 2dcce15a6ab9..37e5d4a8adc0 100644 --- a/crates/swc_ecma_parser/tests/tsc/classWithoutExplicitConstructor.json +++ b/crates/swc_ecma_parser/tests/tsc/classWithoutExplicitConstructor.json @@ -375,6 +375,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherInvalidOperation.json b/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherInvalidOperation.json index 3b5913dd2012..9c5a4b562096 100644 --- a/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherInvalidOperation.json +++ b/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherInvalidOperation.json @@ -520,6 +520,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -542,6 +543,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherValidOperation.json b/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherValidOperation.json index cf1594efd669..fc15269ba063 100644 --- a/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherValidOperation.json +++ b/crates/swc_ecma_parser/tests/tsc/commaOperatorOtherValidOperation.json @@ -684,6 +684,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -706,6 +707,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalTypeParameter.json index a5e620b82f06..7532efda525c 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithIdenticalTypeParameter.json @@ -600,6 +600,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json index f51c0135d4b6..987643b4736e 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnCallSignature.json @@ -1911,6 +1911,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2088,6 +2089,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json index 52dab114d484..4e87bb2aa972 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnConstructorSignature.json @@ -1848,6 +1848,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2012,6 +2013,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json index 3c27c40635e2..a07a8ecf2277 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedCallSignature.json @@ -385,6 +385,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -644,6 +645,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -931,6 +933,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1240,6 +1243,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1586,6 +1590,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1937,6 +1942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1959,6 +1965,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.json index 0fe5b9476b92..61c770cd6a40 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipObjectsOnInstantiatedConstructorSignature.json @@ -372,6 +372,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -605,6 +606,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -866,6 +868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1149,6 +1152,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1469,6 +1473,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1794,6 +1799,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1816,6 +1822,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json index eb6b989f66bc..4ec318662837 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithNoRelationshipTypeParameter.json @@ -7960,6 +7960,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7982,6 +7983,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsAny.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsAny.json index 62c78ac4a0d4..5e27200c8084 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsAny.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsAny.json @@ -1216,6 +1216,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsNull.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsNull.json index 5fab38007ef6..073ad58a8507 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsNull.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsNull.json @@ -1135,6 +1135,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsUndefined.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsUndefined.json index 15d6c032c837..98c365cc5539 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsUndefined.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithOneOperandIsUndefined.json @@ -1226,6 +1226,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json index b7b59769767c..8d311800a7b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedCallSignature.json @@ -313,6 +313,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -600,6 +601,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -951,6 +953,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -973,6 +976,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1287,6 +1291,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1596,6 +1601,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1942,6 +1948,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.json index d33d98066b2d..6a34af851624 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithSubtypeObjectOnInstantiatedConstructorSignature.json @@ -300,6 +300,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -561,6 +562,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -886,6 +888,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -908,6 +911,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1196,6 +1200,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1479,6 +1484,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1799,6 +1805,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithTypeParameter.json index 514960b1fa45..3a8711c49009 100644 --- a/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/comparisonOperatorWithTypeParameter.json @@ -4216,6 +4216,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4238,6 +4239,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4260,6 +4262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES5.json index 0642405b5bae..cb648205d5bb 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES5.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -297,6 +298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES6.json index 0642405b5bae..cb648205d5bb 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames32_ES6.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -297,6 +298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES5.json index 186e77c24993..db11cc5e424e 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES5.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -326,6 +327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES6.json index 186e77c24993..db11cc5e424e 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames33_ES6.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -326,6 +327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES5.json index 01a79e0fe14e..9785db8f0e46 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES5.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -326,6 +327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES6.json index 01a79e0fe14e..9785db8f0e46 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames34_ES6.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -326,6 +327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames35_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames35_ES5.json index ec5e1682892a..2edddb4ad93a 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames35_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames35_ES5.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -135,6 +136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames35_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames35_ES6.json index ec5e1682892a..2edddb4ad93a 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames35_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames35_ES6.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -135,6 +136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.json index 868d8dbfa4d0..4bd8a3d38e0a 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES5.json @@ -160,6 +160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.json index 868d8dbfa4d0..4bd8a3d38e0a 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames48_ES6.json @@ -160,6 +160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES5.json index 105bfed73a27..c55d11d4defe 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES5.json @@ -287,6 +287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -309,6 +310,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES6.json index e85c8874fc37..c5dc4e4a02a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames51_ES6.json @@ -287,6 +287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -309,6 +310,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES5.json index 0f851918a141..a0a82cf49ac6 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES5.json @@ -287,6 +287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -309,6 +310,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES6.json index 0f851918a141..a0a82cf49ac6 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames8_ES6.json @@ -287,6 +287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -309,6 +310,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.json index 37163e6d3386..87a7d1852905 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES5.json @@ -261,6 +261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.json index 37163e6d3386..87a7d1852905 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNames9_ES6.json @@ -261,6 +261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES5.json index b7a7d6142165..995b27d09a34 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES5.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -259,6 +260,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES6.json index b7a7d6142165..995b27d09a34 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType6_ES6.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -259,6 +260,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES5.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES5.json index 36240d07f042..cff4e22d7971 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES5.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -179,6 +180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -387,6 +389,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -545,6 +548,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES6.json b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES6.json index 36240d07f042..cff4e22d7971 100644 --- a/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/computedPropertyNamesContextualType7_ES6.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -179,6 +180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -387,6 +389,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -545,6 +548,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json index 0606a045810a..b4c0aa4f3782 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypes1.json @@ -1123,6 +1123,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1502,6 +1503,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1922,6 +1924,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2355,6 +2358,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -3819,6 +3823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3859,6 +3864,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -4100,6 +4106,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -4398,6 +4405,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4420,6 +4428,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4469,6 +4478,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -4591,6 +4601,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4814,6 +4825,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5436,6 +5448,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5548,6 +5561,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5660,6 +5674,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5867,6 +5882,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5899,6 +5915,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6522,6 +6539,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6562,6 +6580,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6772,6 +6791,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6917,6 +6937,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6957,6 +6978,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7167,6 +7189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7883,6 +7906,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8381,6 +8405,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8433,6 +8458,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8695,6 +8721,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8832,6 +8859,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8864,6 +8892,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9762,6 +9791,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -10227,6 +10257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -10796,6 +10827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -11239,6 +11271,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -11318,6 +11351,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -11487,6 +11521,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11759,6 +11794,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12031,6 +12067,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12379,6 +12416,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -12401,6 +12439,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12532,6 +12571,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -12562,6 +12602,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -12584,6 +12625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12717,6 +12759,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -12857,6 +12900,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -12887,6 +12931,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -13029,6 +13074,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -13059,6 +13105,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -13201,6 +13248,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -15352,6 +15400,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -15741,6 +15790,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -15901,6 +15951,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -16012,6 +16063,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -16172,6 +16224,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -16240,6 +16293,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -16262,6 +16316,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -16784,6 +16839,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -16806,6 +16862,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -17310,6 +17367,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -17332,6 +17390,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -17836,6 +17895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -17941,6 +18001,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -18142,6 +18203,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -18252,6 +18314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -18446,6 +18509,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -18836,6 +18900,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -19219,6 +19284,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -19241,6 +19307,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -19617,6 +19684,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -19639,6 +19707,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -19691,6 +19760,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -19841,6 +19911,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -20087,6 +20158,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -20293,6 +20365,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -20403,6 +20476,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -20589,6 +20663,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -20871,6 +20946,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -21077,6 +21153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -21187,6 +21264,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -21309,6 +21387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -21510,6 +21589,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -21716,6 +21796,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -21854,6 +21935,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -21876,6 +21958,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -22070,6 +22153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -22092,6 +22176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -22114,6 +22199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -22247,6 +22333,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -22295,6 +22382,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -22543,6 +22631,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -22573,6 +22662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", @@ -22621,6 +22711,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -23166,6 +23257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -23205,6 +23297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -23277,6 +23370,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -23347,6 +23441,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -23515,6 +23610,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -23537,6 +23633,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -24287,6 +24384,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -24420,6 +24518,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -25181,6 +25280,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -25260,6 +25360,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -25292,6 +25393,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -25567,6 +25669,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -25599,6 +25702,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -26241,6 +26345,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -26710,6 +26815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -26822,6 +26928,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsLiteralType", "span": { @@ -26988,6 +27095,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -27110,6 +27218,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsLiteralType", "span": { @@ -27164,6 +27273,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json index 960bf4ef9c2f..90d93b738396 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypes2.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -209,6 +210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -376,6 +378,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -792,6 +795,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -814,6 +818,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1123,6 +1128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1145,6 +1151,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1454,6 +1461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1476,6 +1484,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1653,6 +1662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1965,6 +1975,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2267,6 +2278,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3212,6 +3224,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3234,6 +3247,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3256,6 +3270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3951,6 +3966,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4518,6 +4534,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4711,6 +4728,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4764,6 +4782,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5256,6 +5275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5916,6 +5936,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6097,6 +6118,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6198,6 +6220,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6367,6 +6390,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7081,6 +7105,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7133,6 +7158,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7155,6 +7181,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7177,6 +7204,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7244,6 +7272,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -7279,6 +7308,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7692,6 +7722,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7714,6 +7745,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7781,6 +7813,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -7816,6 +7849,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8210,6 +8244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8232,6 +8267,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8254,6 +8290,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8286,6 +8323,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -8321,6 +8359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8659,6 +8698,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8681,6 +8721,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8703,6 +8744,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8832,6 +8874,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9045,6 +9088,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9067,6 +9111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9196,6 +9241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9390,6 +9436,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9412,6 +9459,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9434,6 +9482,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9501,6 +9550,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9713,6 +9763,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -10399,6 +10450,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10439,6 +10491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10761,6 +10814,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11030,6 +11084,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11346,6 +11401,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11657,6 +11713,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12014,6 +12071,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -12036,6 +12094,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12131,6 +12190,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -12657,6 +12717,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12725,6 +12786,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12880,6 +12942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -13143,6 +13206,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -13319,6 +13383,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -13504,6 +13569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -13526,6 +13592,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -13566,6 +13633,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -13850,6 +13918,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -13872,6 +13941,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -14297,6 +14367,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -14365,6 +14436,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -14616,6 +14688,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -14852,6 +14925,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json b/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json index 7f70b6fc6ed2..a51a5c11e0de 100644 --- a/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/conditionalTypesExcessProperties.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -645,6 +646,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/constAssertions.json b/crates/swc_ecma_parser/tests/tsc/constAssertions.json index 4ce373f59692..b3cab07a6b03 100644 --- a/crates/swc_ecma_parser/tests/tsc/constAssertions.json +++ b/crates/swc_ecma_parser/tests/tsc/constAssertions.json @@ -3700,6 +3700,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4816,6 +4817,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -4846,6 +4848,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6844,6 +6847,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json index 29b48aab5ae5..5829f1e60b68 100644 --- a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json +++ b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny.json @@ -128,6 +128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -301,6 +302,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -506,6 +508,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -579,6 +582,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1152,6 +1156,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1458,6 +1463,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1796,6 +1802,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -1869,6 +1876,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny2.json b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny2.json index 90371acc407e..e6dd17abad50 100644 --- a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny2.json +++ b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithAny2.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -125,6 +126,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -198,6 +200,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json index 64884b4c224f..0444925d892a 100644 --- a/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json +++ b/crates/swc_ecma_parser/tests/tsc/constraintSatisfactionWithEmptyObject.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -437,6 +438,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -573,6 +575,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -841,6 +844,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1157,6 +1161,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1283,6 +1288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json index b2b37c579e2f..5ec6d322677a 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance.json @@ -719,6 +719,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1091,6 +1092,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1617,6 +1619,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1865,6 +1868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2194,6 +2198,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json index aa4a537086be..71c513963e01 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance2.json @@ -3210,6 +3210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3332,6 +3333,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4186,6 +4188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4333,6 +4336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4470,6 +4474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4646,6 +4651,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4668,6 +4674,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4863,6 +4870,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4885,6 +4893,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5080,6 +5089,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5120,6 +5130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5333,6 +5344,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5373,6 +5385,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5735,6 +5748,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5775,6 +5789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6210,6 +6225,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6250,6 +6266,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6485,6 +6502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6679,6 +6697,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6901,6 +6920,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7179,6 +7199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7457,6 +7478,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7479,6 +7501,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7618,6 +7641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7765,6 +7789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7977,6 +8002,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8181,6 +8207,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json index 713fece74a10..d35c789f5ef1 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance3.json @@ -2523,6 +2523,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2545,6 +2546,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2638,6 +2640,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2660,6 +2663,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3019,6 +3023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3059,6 +3064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3099,6 +3105,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3544,6 +3551,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3584,6 +3592,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3870,6 +3879,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4115,6 +4125,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4416,6 +4427,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4745,6 +4757,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5028,6 +5041,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5283,6 +5297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5491,6 +5506,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5689,6 +5705,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5857,6 +5874,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6045,6 +6063,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6256,6 +6275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6378,6 +6398,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6560,6 +6581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json index 62226b20af10..7985b6ca0a54 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance4.json @@ -451,6 +451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -598,6 +599,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -735,6 +737,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -901,6 +904,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -923,6 +927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1108,6 +1113,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1130,6 +1136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1325,6 +1332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1654,6 +1662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1886,6 +1895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2126,6 +2136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2334,6 +2345,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2466,6 +2478,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2630,6 +2643,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2752,6 +2766,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2983,6 +2998,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3172,6 +3188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3370,6 +3387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3494,6 +3512,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3682,6 +3701,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3806,6 +3826,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4020,6 +4041,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4167,6 +4189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4304,6 +4327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4480,6 +4504,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4502,6 +4527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4687,6 +4713,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4709,6 +4736,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4904,6 +4932,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4944,6 +4973,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5273,6 +5303,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5295,6 +5326,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5527,6 +5559,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5549,6 +5582,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5789,6 +5823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5936,6 +5971,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6101,6 +6137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6313,6 +6350,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6502,6 +6540,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json index bf1d148fad7c..c81525c264fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance5.json @@ -3060,6 +3060,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3258,6 +3259,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3405,6 +3407,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3542,6 +3545,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3718,6 +3722,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3740,6 +3745,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3935,6 +3941,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3957,6 +3964,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4152,6 +4160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4192,6 +4201,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4405,6 +4415,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4445,6 +4456,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4807,6 +4819,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4847,6 +4860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5282,6 +5296,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5322,6 +5337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5557,6 +5573,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5751,6 +5768,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5973,6 +5991,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6251,6 +6270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6529,6 +6549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6551,6 +6572,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json index fdd06706790f..fc912c21b26f 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignatureAssignabilityInInheritance6.json @@ -451,6 +451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -598,6 +599,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -735,6 +737,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -901,6 +904,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -923,6 +927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1108,6 +1113,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1130,6 +1136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1325,6 +1332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1654,6 +1662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1886,6 +1895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2126,6 +2136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2237,6 +2248,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2435,6 +2447,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2623,6 +2636,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2813,6 +2827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2986,6 +3001,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3061,6 +3077,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3253,6 +3270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3338,6 +3356,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3646,6 +3665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3731,6 +3751,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithIdenticalOverloads.json b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithIdenticalOverloads.json index 63b3c130f939..19a98c787085 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithIdenticalOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithIdenticalOverloads.json @@ -706,6 +706,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1191,6 +1192,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1620,6 +1622,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1781,6 +1784,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2455,6 +2459,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2616,6 +2621,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads.json b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads.json index 7c40cac9bb83..dde51eec4ad9 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads.json @@ -706,6 +706,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1191,6 +1192,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1620,6 +1622,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1781,6 +1784,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2455,6 +2459,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2616,6 +2621,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads2.json b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads2.json index 334dbe3d828a..eb63b3986577 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloads2.json @@ -786,6 +786,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1213,6 +1214,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.json b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.json index 1a9449e74803..761004f6e1a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/constructSignaturesWithOverloadsThatDifferOnlyByReturnType.json @@ -263,6 +263,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -549,6 +550,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -940,6 +942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1073,6 +1076,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1530,6 +1534,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1663,6 +1668,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json b/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json index 90ad81591f71..a2c82ac20230 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorDefaultValuesReferencingThis.json @@ -219,6 +219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -348,6 +349,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorHasPrototypeProperty.json b/crates/swc_ecma_parser/tests/tsc/constructorHasPrototypeProperty.json index bd12a8747f11..9dabfb8bec8f 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorHasPrototypeProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorHasPrototypeProperty.json @@ -568,6 +568,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -590,6 +591,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -767,6 +769,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -789,6 +792,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json index 2229ec317a54..70aab6f12744 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues.json @@ -419,6 +419,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -657,6 +658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json index f643e60a99fd..e3bc98937702 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorImplementationWithDefaultValues2.json @@ -580,6 +580,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -602,6 +603,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -852,6 +854,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithDefaultValues.json b/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithDefaultValues.json index b36ced4cd617..1bc29dc22c93 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithDefaultValues.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithDefaultValues.json @@ -357,6 +357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithOptionalParameters.json index 4708fa12c78e..99641c3d82ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorOverloadsWithOptionalParameters.json @@ -407,6 +407,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties.json b/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties.json index af0235046980..b6a7deedad4e 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorParameterProperties.json @@ -706,6 +706,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorWithAssignableReturnExpression.json b/crates/swc_ecma_parser/tests/tsc/constructorWithAssignableReturnExpression.json index d2769684eb4f..7e6cc936fec0 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorWithAssignableReturnExpression.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorWithAssignableReturnExpression.json @@ -524,6 +524,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -734,6 +735,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/constructorWithExpressionLessReturn.json b/crates/swc_ecma_parser/tests/tsc/constructorWithExpressionLessReturn.json index ff136ecb065f..9784aaf273f6 100644 --- a/crates/swc_ecma_parser/tests/tsc/constructorWithExpressionLessReturn.json +++ b/crates/swc_ecma_parser/tests/tsc/constructorWithExpressionLessReturn.json @@ -432,6 +432,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json b/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json index f2f525f18a40..967c38ae3dcf 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualSignatureInstantiation.json @@ -176,6 +176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -491,6 +492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -513,6 +515,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -535,6 +538,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -850,6 +854,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -872,6 +877,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1048,6 +1054,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1224,6 +1231,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1246,6 +1254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json index 7fcd2896efe0..2fa82b02bd5a 100644 --- a/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/contextualTypeWithUnionTypeMembers.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -419,6 +420,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json b/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json index ff7eecb49b25..e36570f5d0df 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowGenericTypes.json @@ -682,6 +682,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1032,6 +1033,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1100,6 +1102,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1533,6 +1536,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1767,6 +1771,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -2049,6 +2054,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -2331,6 +2337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -2604,6 +2611,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -3012,6 +3020,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -4163,6 +4172,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4710,6 +4720,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5136,6 +5147,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5431,6 +5443,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5518,6 +5531,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5860,6 +5874,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5882,6 +5897,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6258,6 +6274,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6280,6 +6297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6621,6 +6639,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6707,6 +6726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7048,6 +7068,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -7153,6 +7174,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7760,6 +7782,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7846,6 +7869,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -8163,6 +8187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -8284,6 +8309,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8360,6 +8386,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8799,6 +8826,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9475,6 +9503,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9515,6 +9544,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json b/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json index 7fedc9d33a7c..ed1107b25e78 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowIfStatement.json @@ -1170,6 +1170,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1454,6 +1455,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1530,6 +1532,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json index 39aa73f90f18..d7ece2cfec36 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowOptionalChain.json @@ -6078,6 +6078,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -18249,6 +18250,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/controlFlowTruthiness.json b/crates/swc_ecma_parser/tests/tsc/controlFlowTruthiness.json index 61b6b5249e92..2b194115f406 100644 --- a/crates/swc_ecma_parser/tests/tsc/controlFlowTruthiness.json +++ b/crates/swc_ecma_parser/tests/tsc/controlFlowTruthiness.json @@ -1902,6 +1902,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2089,6 +2090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json b/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json index 9ea9d9c962c6..fb3f9dee9ef4 100644 --- a/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json +++ b/crates/swc_ecma_parser/tests/tsc/covariantCallbacks.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/declarationFiles.json b/crates/swc_ecma_parser/tests/tsc/declarationFiles.json index 996270a1b13f..f3aaed9c6685 100644 --- a/crates/swc_ecma_parser/tests/tsc/declarationFiles.json +++ b/crates/swc_ecma_parser/tests/tsc/declarationFiles.json @@ -386,6 +386,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorCallGeneric.json b/crates/swc_ecma_parser/tests/tsc/decoratorCallGeneric.json index f619889844bf..020e3b1f92ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorCallGeneric.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorCallGeneric.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -321,6 +322,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass1.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass1.es6.json index 99194bc01235..5ea86171a187 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass1.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass1.es6.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass2.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass2.es6.json index 7860a851aef9..2f4f54635586 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass2.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass2.es6.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass3.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass3.es6.json index e18002e64477..c7931fd9a062 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass3.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass3.es6.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass4.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass4.es6.json index 6a361bb4bd3c..14e81d9b9e12 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass4.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass4.es6.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass5.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass5.es6.json index 25f8ad7811f7..5d7bdd2d361f 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass5.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass5.es6.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass6.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass6.es6.json index e968e94f04bd..bfa73dc3a3dd 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass6.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass6.es6.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass7.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass7.es6.json index 70617cee16a4..4c423311e049 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass7.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass7.es6.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass8.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass8.es6.json index dbb801fec210..b95315aeef16 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClass8.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClass8.es6.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassAccessor1.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassAccessor1.es6.json index 72715c3af69d..00f415cfc1e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassAccessor1.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassAccessor1.es6.json @@ -203,6 +203,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod1.es6.json b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod1.es6.json index 776ac1e69f9b..72938b40ef56 100644 --- a/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod1.es6.json +++ b/crates/swc_ecma_parser/tests/tsc/decoratorOnClassMethod1.es6.json @@ -203,6 +203,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json b/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json index 2c5ddcacfa66..8613add1af49 100644 --- a/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json +++ b/crates/swc_ecma_parser/tests/tsc/dependentDestructuredVariables.json @@ -4195,6 +4195,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4358,6 +4359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4549,6 +4551,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4756,6 +4759,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4904,6 +4908,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5339,6 +5344,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11882,6 +11888,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassConstructorWithoutSuperCall.json b/crates/swc_ecma_parser/tests/tsc/derivedClassConstructorWithoutSuperCall.json index 451ac4774e73..5e7554c507c1 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassConstructorWithoutSuperCall.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassConstructorWithoutSuperCall.json @@ -249,6 +249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -410,6 +411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -619,6 +621,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -795,6 +798,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassParameterProperties.json b/crates/swc_ecma_parser/tests/tsc/derivedClassParameterProperties.json index cbf057ac5ade..ed9086bf441c 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassParameterProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassParameterProperties.json @@ -2033,6 +2033,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2383,6 +2384,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2761,6 +2763,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity3.json b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity3.json index 2ce03d6024e8..2e85b2dbd817 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity3.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassTransitivity3.json @@ -195,6 +195,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -355,6 +356,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -579,6 +581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor.json b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor.json index 1cd1b7fb68d2..678f42ed3453 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor.json @@ -658,6 +658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -825,6 +826,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor2.json b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor2.json index b3ad120f6993..acc7d589c268 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor2.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor2.json @@ -1331,6 +1331,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1498,6 +1499,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor3.json b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor3.json index 8d35bf541dd7..13e99ac923d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor3.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedClassWithoutExplicitConstructor3.json @@ -1008,6 +1008,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1354,6 +1355,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1521,6 +1523,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/derivedGenericClassWithAny.json b/crates/swc_ecma_parser/tests/tsc/derivedGenericClassWithAny.json index 2998de65c762..816f4d78f956 100644 --- a/crates/swc_ecma_parser/tests/tsc/derivedGenericClassWithAny.json +++ b/crates/swc_ecma_parser/tests/tsc/derivedGenericClassWithAny.json @@ -289,6 +289,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1063,6 +1064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES5.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES5.json index 49c815113d65..50ee6f5c04bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES5.json @@ -2049,6 +2049,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2463,6 +2464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES5iterable.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES5iterable.json index 2a727fe6a64d..28fdc7d52e3a 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES5iterable.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES5iterable.json @@ -2049,6 +2049,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2463,6 +2464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES6.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES6.json index 49c815113d65..50ee6f5c04bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration3ES6.json @@ -2049,6 +2049,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2463,6 +2464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json index 8764477efa61..ddd09e1eec83 100644 --- a/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json +++ b/crates/swc_ecma_parser/tests/tsc/destructuringParameterDeclaration5.json @@ -662,6 +662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -854,6 +855,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1046,6 +1048,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1238,6 +1241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1414,6 +1418,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json b/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json index 17f50cbd5b4e..a59f01e5bd3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json +++ b/crates/swc_ecma_parser/tests/tsc/directDependenceBetweenTypeAliases.json @@ -207,6 +207,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -397,6 +398,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -757,6 +759,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json index fafb32f0eae5..ba64191d0b37 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionInference.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -207,6 +208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -355,6 +357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -510,6 +513,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -592,6 +596,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -759,6 +764,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1130,6 +1136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json index 12f159cafd31..820d339108e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/discriminatedUnionTypes2.json @@ -1959,6 +1959,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2011,6 +2012,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2767,6 +2769,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2921,6 +2924,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3534,6 +3538,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/duplicateNumericIndexers.json b/crates/swc_ecma_parser/tests/tsc/duplicateNumericIndexers.json index 52ad1e7d8eef..4415e9962d98 100644 --- a/crates/swc_ecma_parser/tests/tsc/duplicateNumericIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/duplicateNumericIndexers.json @@ -337,6 +337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/duplicatePropertyNames.json b/crates/swc_ecma_parser/tests/tsc/duplicatePropertyNames.json index 0ceb0dd8c91a..dfc95e8b9969 100644 --- a/crates/swc_ecma_parser/tests/tsc/duplicatePropertyNames.json +++ b/crates/swc_ecma_parser/tests/tsc/duplicatePropertyNames.json @@ -275,6 +275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/duplicateStringIndexers.json b/crates/swc_ecma_parser/tests/tsc/duplicateStringIndexers.json index 691a0bdab265..6cec2cc2cc2f 100644 --- a/crates/swc_ecma_parser/tests/tsc/duplicateStringIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/duplicateStringIndexers.json @@ -364,6 +364,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/elementAccessChain.json b/crates/swc_ecma_parser/tests/tsc/elementAccessChain.json index 5b7159414053..96201d2bd796 100644 --- a/crates/swc_ecma_parser/tests/tsc/elementAccessChain.json +++ b/crates/swc_ecma_parser/tests/tsc/elementAccessChain.json @@ -2102,6 +2102,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.json index 61474d107826..16a9b1261499 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithExtensionAndTypeArgumentInES6.json @@ -133,6 +133,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.json index 650b9a72d304..2175db910e2c 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentAndOverloadInES6.json @@ -1057,6 +1057,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.json b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.json index 4728da1a8d05..67e1e5fcfd2b 100644 --- a/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.json +++ b/crates/swc_ecma_parser/tests/tsc/emitClassDeclarationWithTypeArgumentInES6.json @@ -658,6 +658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/enumAssignability.json b/crates/swc_ecma_parser/tests/tsc/enumAssignability.json index 84e0c4be444b..0d598a1484dd 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumAssignability.json +++ b/crates/swc_ecma_parser/tests/tsc/enumAssignability.json @@ -1883,6 +1883,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2516,6 +2517,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2538,6 +2540,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2578,6 +2581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2618,6 +2622,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2658,6 +2663,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json b/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json index d93437ab694f..2145b31ca709 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json +++ b/crates/swc_ecma_parser/tests/tsc/enumAssignabilityInInheritance.json @@ -3208,6 +3208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3967,6 +3968,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4094,6 +4096,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json b/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json index c3ab5bca93bb..507fee5b18a4 100644 --- a/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json +++ b/crates/swc_ecma_parser/tests/tsc/enumIsNotASubtypeOfAnythingButNumber.json @@ -1694,6 +1694,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2175,6 +2176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3067,6 +3069,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3246,6 +3249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3268,6 +3272,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json b/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json index 7e423d4669d0..6555285fd0a7 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeAssignableToAny.json @@ -1304,6 +1304,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2458,6 +2459,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2480,6 +2482,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2502,6 +2505,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json index 3f53b36165f7..4895e755d215 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInitializer.json @@ -469,6 +469,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json index 007a79b8d62e..dac8a6c7adc2 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithAnnotationAndInvalidInitializer.json @@ -469,6 +469,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json b/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json index 96f0db4bfc63..29316c920cd4 100644 --- a/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/everyTypeWithInitializer.json @@ -469,6 +469,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTypeParameter.json index 03814f4e5f96..4b5793d25d1d 100644 --- a/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/exponentiationOperatorWithTypeParameter.json @@ -1028,6 +1028,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json b/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json index 887ac4e30443..fa94dec7402a 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignTypes.json @@ -552,6 +552,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1361,6 +1362,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json index 387d80fb5f22..8449347f7710 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentConstrainedGenericType.json @@ -188,6 +188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/exportAssignmentGenericType.json b/crates/swc_ecma_parser/tests/tsc/exportAssignmentGenericType.json index 23b5a78668bd..8f2ac1ffccc9 100644 --- a/crates/swc_ecma_parser/tests/tsc/exportAssignmentGenericType.json +++ b/crates/swc_ecma_parser/tests/tsc/exportAssignmentGenericType.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json b/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json index c4807eccb909..5fca56ee4067 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendBooleanInterface.json @@ -187,6 +187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json b/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json index ee383becaa3d..f6179645a074 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendNumberInterface.json @@ -187,6 +187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json b/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json index 9f8b1849270b..2ca3eee88308 100644 --- a/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/extendStringInterface.json @@ -187,6 +187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/for-inStatements.json b/crates/swc_ecma_parser/tests/tsc/for-inStatements.json index 535709ffc6cf..7bf03e8e9fcc 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-inStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/for-inStatements.json @@ -1495,6 +1495,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3184,6 +3185,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json b/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json index 153eb9655786..4543f24c4327 100644 --- a/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json +++ b/crates/swc_ecma_parser/tests/tsc/for-inStatementsInvalid.json @@ -1277,6 +1277,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/forStatements.json b/crates/swc_ecma_parser/tests/tsc/forStatements.json index 2be557ad73be..c67e72837a4c 100644 --- a/crates/swc_ecma_parser/tests/tsc/forStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/forStatements.json @@ -469,6 +469,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json index d2c500f519c1..d7b413610abf 100644 --- a/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json +++ b/crates/swc_ecma_parser/tests/tsc/forStatementsMultipleInvalidDecl.json @@ -595,6 +595,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json index 3e23b10b04ad..7971dd6f1ce0 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json +++ b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1495,6 +1496,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1769,6 +1771,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1918,6 +1921,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2074,6 +2078,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2230,6 +2235,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2373,6 +2379,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2521,6 +2528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2698,6 +2706,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2846,6 +2855,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3049,6 +3059,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3071,6 +3082,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3803,6 +3815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -3861,6 +3874,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json index e360b4bbe807..550c07a36b3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction2.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -481,6 +482,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -850,6 +852,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -999,6 +1002,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1470,6 +1474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1655,6 +1660,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1677,6 +1683,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2277,6 +2284,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2335,6 +2343,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction3.json b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction3.json index b3e7680df82b..90492afb1ed2 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction3.json +++ b/crates/swc_ecma_parser/tests/tsc/functionConstraintSatisfaction3.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -1307,6 +1308,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1581,6 +1583,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1730,6 +1733,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1886,6 +1890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2042,6 +2047,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2185,6 +2191,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2362,6 +2369,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2510,6 +2518,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json index 6e2a1ef8a94b..e1521745588f 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping1.json @@ -393,6 +393,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3096,6 +3097,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3118,6 +3120,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping3.json b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping3.json index 4e03e6e74085..06a3ece5cf7f 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping3.json +++ b/crates/swc_ecma_parser/tests/tsc/functionExpressionContextualTyping3.json @@ -122,6 +122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/functionImplementations.json b/crates/swc_ecma_parser/tests/tsc/functionImplementations.json index df21cd3d59b3..db307778d8c9 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionImplementations.json +++ b/crates/swc_ecma_parser/tests/tsc/functionImplementations.json @@ -1449,6 +1449,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1626,6 +1627,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiteral.json b/crates/swc_ecma_parser/tests/tsc/functionLiteral.json index a3356cd7df18..2575c59fa4b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiteral.json @@ -479,6 +479,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -574,6 +575,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads.json b/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads.json index 078c06a37ca7..861e3425de71 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads.json @@ -321,6 +321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -407,6 +408,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -587,6 +589,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -683,6 +686,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -863,6 +867,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -959,6 +964,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads2.json b/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads2.json index 17a616e2e0f0..ca3393b0c563 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiteralForOverloads2.json @@ -421,6 +421,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -749,6 +750,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -845,6 +847,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1028,6 +1031,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1152,6 +1156,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/functionLiterals.json b/crates/swc_ecma_parser/tests/tsc/functionLiterals.json index b0c45a8063f1..b635b4b82740 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/functionLiterals.json @@ -1374,6 +1374,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1482,6 +1483,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1635,6 +1637,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2237,6 +2240,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2346,6 +2350,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2479,6 +2484,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2575,6 +2581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json b/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json index bd4d5de953a5..ba08e785f36e 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/functionOverloadErrors.json @@ -1136,6 +1136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1230,6 +1231,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1368,6 +1370,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1472,6 +1475,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1563,6 +1567,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1638,6 +1643,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1747,6 +1753,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1822,6 +1829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeQuery", "span": { @@ -1926,6 +1934,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2100,6 +2109,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2221,6 +2231,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3602,6 +3613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3749,6 +3761,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements.json b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements.json index 61094e138967..bd6947869bb6 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements.json @@ -809,6 +809,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -831,6 +832,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1063,6 +1065,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1103,6 +1106,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1143,6 +1147,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json index 9bdb7774dc95..68b55caf4560 100644 --- a/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json +++ b/crates/swc_ecma_parser/tests/tsc/functionWithMultipleReturnStatements2.json @@ -667,6 +667,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json index 1c0f50132f9c..9cb3804f3d33 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/generatedContextualTyping.json @@ -237,6 +237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorImplicitAny.json b/crates/swc_ecma_parser/tests/tsc/generatorImplicitAny.json index cd5bd993b186..6a2f0fd4e671 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorImplicitAny.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorImplicitAny.json @@ -179,6 +179,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json index 8ec4a6a6d5d5..f95b1a99a3fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInference.json @@ -1596,6 +1596,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2524,6 +2525,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2732,6 +2734,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2986,6 +2989,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3008,6 +3012,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3030,6 +3035,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json index 93044d7ecd4b..70df256a3b36 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorReturnTypeInferenceNonStrict.json @@ -1596,6 +1596,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2524,6 +2525,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2732,6 +2734,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2986,6 +2989,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3008,6 +3012,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3030,6 +3035,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck45.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck45.json index 9378ca590eac..cb0c603f5f3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck45.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck45.json @@ -353,6 +353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -375,6 +376,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck46.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck46.json index 9e0aefa988fe..2424bd860040 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck46.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck46.json @@ -353,6 +353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -375,6 +376,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json index 7bec2a05501f..236ee392f16d 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck62.json @@ -589,6 +589,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -796,6 +797,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json index 3b828fd0a4ec..f7925df28ed7 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorTypeCheck63.json @@ -589,6 +589,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -796,6 +797,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json b/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json index a06b6a2b1cf0..9fb7955afb28 100644 --- a/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json +++ b/crates/swc_ecma_parser/tests/tsc/generatorYieldContextualType.json @@ -187,6 +187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -209,6 +210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -231,6 +233,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -719,6 +722,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -741,6 +745,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -763,6 +768,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/generic.json b/crates/swc_ecma_parser/tests/tsc/generic.json index df17153e8f77..2f2f1a503c34 100644 --- a/crates/swc_ecma_parser/tests/tsc/generic.json +++ b/crates/swc_ecma_parser/tests/tsc/generic.json @@ -118,6 +118,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName.json b/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName.json index f3fe0c429e7d..281b3258e9a7 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName.json +++ b/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName.json @@ -123,6 +123,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -263,6 +264,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -580,6 +582,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -840,6 +843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName2.json b/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName2.json index 669a6f4ec4b0..e5c59900a7f7 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericAndNonGenericInterfaceWithTheSameName2.json @@ -78,6 +78,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -350,6 +351,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json index 602d5ffc83a9..aae01118aced 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallToOverloadedMethodWithOverloadedArguments.json @@ -78,6 +78,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -317,6 +318,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -669,6 +671,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -908,6 +911,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1367,6 +1371,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1606,6 +1611,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1948,6 +1954,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2300,6 +2307,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2539,6 +2547,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2881,6 +2890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3340,6 +3350,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3579,6 +3590,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3921,6 +3933,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4308,6 +4321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4767,6 +4781,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5006,6 +5021,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5348,6 +5364,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json index 18f15ea20a5a..521c09863487 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallTypeArgumentInference.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -373,6 +374,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -395,6 +397,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -585,6 +588,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -607,6 +611,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1399,6 +1404,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1588,6 +1594,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1777,6 +1784,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1799,6 +1807,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1954,6 +1963,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1976,6 +1986,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2178,6 +2189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2200,6 +2212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2355,6 +2368,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2377,6 +2391,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2421,6 +2436,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2443,6 +2459,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3281,6 +3298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3303,6 +3321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3803,6 +3822,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3959,6 +3979,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4115,6 +4136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4137,6 +4159,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4218,6 +4241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4240,6 +4264,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4359,6 +4384,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4381,6 +4407,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4462,6 +4489,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4484,6 +4512,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithArrayLiteralArgs.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithArrayLiteralArgs.json index c7d6752f905a..d3e59b2a8b42 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithArrayLiteralArgs.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithArrayLiteralArgs.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json index 4d61c13b326f..5d4b81567b32 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference.json @@ -541,6 +541,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -868,6 +869,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -908,6 +910,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1116,6 +1119,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1156,6 +1160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1317,6 +1322,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1357,6 +1363,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2140,6 +2147,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2347,6 +2355,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2554,6 +2563,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2594,6 +2604,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2767,6 +2778,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2807,6 +2819,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3027,6 +3040,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3067,6 +3081,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3240,6 +3255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3280,6 +3296,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3342,6 +3359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3382,6 +3400,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4338,6 +4357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4378,6 +4398,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4896,6 +4917,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5070,6 +5092,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5244,6 +5267,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5284,6 +5308,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5383,6 +5408,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5423,6 +5449,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5560,6 +5587,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5600,6 +5628,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5699,6 +5728,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5739,6 +5769,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference2.json index f0ab36ace1ca..0d1677762a00 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstraintsTypeArgumentInference2.json @@ -189,6 +189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -211,6 +212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json index a55a80dab835..35641fa134d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithConstructorTypedArguments5.json @@ -269,6 +269,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -291,6 +292,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -441,6 +443,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -723,6 +726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1367,6 +1371,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1389,6 +1394,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments.json index aa4567c21237..c4b76c735a09 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments.json @@ -208,6 +208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -348,6 +349,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -496,6 +498,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -870,6 +873,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -892,6 +896,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1074,6 +1079,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1339,6 +1345,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1677,6 +1684,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1699,6 +1707,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1852,6 +1861,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2988,6 +2998,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3010,6 +3021,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments2.json index c40a4369bf09..04fa8b28f600 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments2.json @@ -209,6 +209,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -344,6 +345,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -398,6 +400,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -767,6 +770,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1315,6 +1319,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1337,6 +1342,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1984,6 +1990,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2006,6 +2013,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments3.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments3.json index 707db9634717..4524becef9de 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments3.json @@ -405,6 +405,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -427,6 +428,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -631,6 +633,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -727,6 +730,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments4.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments4.json index ba9431d85de3..81fef7b2c6c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments4.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments4.json @@ -570,6 +570,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -592,6 +593,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -796,6 +798,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -892,6 +895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json index 14904bf5d42f..c83aedf64b79 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithFunctionTypedArguments5.json @@ -268,6 +268,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -290,6 +291,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -430,6 +432,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -700,6 +703,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1185,6 +1189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1207,6 +1212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1433,6 +1439,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json index f842ccc81668..99844ef8bc37 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments.json @@ -403,6 +403,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2080,6 +2081,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2567,6 +2569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2989,6 +2992,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3301,6 +3305,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments2.json index 486667fd4fbc..8495748d4917 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments2.json @@ -430,6 +430,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1089,6 +1090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1511,6 +1513,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1952,6 +1955,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2502,6 +2506,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3132,6 +3137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3154,6 +3160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3813,6 +3820,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4235,6 +4243,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4275,6 +4284,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4716,6 +4726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5266,6 +5277,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments3.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments3.json index f0741d5eb8f3..b9c05343d9b8 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithGenericSignatureArguments3.json @@ -449,6 +449,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2199,6 +2200,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2221,6 +2223,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json index 5e7146e4727c..91543418ccaa 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithNonSymmetricSubtypes.json @@ -235,6 +235,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json index aecb905c6c81..377ce63378a9 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectLiteralArgs.json @@ -223,6 +223,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs.json index db105a513fc1..7a98f5f96496 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs.json @@ -255,6 +255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -548,6 +549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json index 3abf96b37a52..a600acd92405 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgs2.json @@ -519,6 +519,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -559,6 +560,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1134,6 +1136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1174,6 +1177,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1376,6 +1380,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1398,6 +1403,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json index 09f7bc8b57a1..0981b611175b 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints.json @@ -300,6 +300,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -593,6 +594,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1253,6 +1255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json index a6cb94bd2145..46edcd2f1c58 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints2.json @@ -435,6 +435,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -769,6 +770,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1048,6 +1050,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1474,6 +1477,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json index ebd95f1b00ca..673d8da1f2dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints3.json @@ -516,6 +516,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -856,6 +857,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -896,6 +898,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1526,6 +1529,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints4.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints4.json index 8ae873f1f92a..da28d95adf07 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints4.json @@ -416,6 +416,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -438,6 +439,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1639,6 +1641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1661,6 +1664,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints5.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints5.json index 4f85f376a3d9..dfeacd113adc 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints5.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndConstraints5.json @@ -416,6 +416,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -438,6 +439,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -949,6 +951,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -971,6 +974,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexers.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexers.json index 045f16c4a76b..ac7f05935f56 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexers.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -875,6 +876,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexersErrors.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexersErrors.json index 3c4ab045dec0..707c6047578d 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexersErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndIndexersErrors.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -491,6 +492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1082,6 +1084,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1122,6 +1125,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json index 63b5ad43972e..c31a09bd57d1 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndInitializers.json @@ -147,6 +147,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -297,6 +298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -428,6 +430,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -623,6 +626,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -645,6 +649,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -840,6 +845,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -862,6 +868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1103,6 +1110,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1125,6 +1133,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1165,6 +1174,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1360,6 +1370,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1382,6 +1393,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1422,6 +1434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndNumericIndexer.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndNumericIndexer.json index da5cf66c8fd9..cb9c588cdb75 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndNumericIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndNumericIndexer.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -607,6 +608,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -970,6 +972,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1351,6 +1354,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1391,6 +1395,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndStringIndexer.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndStringIndexer.json index 50fcac79f0ef..839690ad35c3 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndStringIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithObjectTypeArgsAndStringIndexer.json @@ -130,6 +130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -607,6 +608,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -996,6 +998,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1403,6 +1406,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1443,6 +1447,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments.json index c56c9e199bb6..1a87c08212d3 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments.json @@ -522,6 +522,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -878,6 +879,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1242,6 +1244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1338,6 +1341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1701,6 +1705,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2168,6 +2173,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2385,6 +2391,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2481,6 +2488,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2627,6 +2635,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2723,6 +2732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments2.json index 88582192be23..c9d7e0c7ce95 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedConstructorTypedArguments2.json @@ -434,6 +434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -456,6 +457,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -812,6 +814,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -960,6 +963,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1323,6 +1327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1498,6 +1503,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1907,6 +1913,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2124,6 +2131,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2220,6 +2228,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments.json index 15023a8b3f6c..0af039f1d7d4 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments.json @@ -492,6 +492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -873,6 +874,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1102,6 +1104,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1198,6 +1201,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1561,6 +1565,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1792,6 +1797,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1977,6 +1983,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2320,6 +2327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2577,6 +2585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2723,6 +2732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2819,6 +2829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments2.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments2.json index 3ccf0a6cc84b..1259cd01edb7 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithOverloadedFunctionTypedArguments2.json @@ -503,6 +503,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -525,6 +526,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -815,6 +817,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -955,6 +958,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1252,6 +1256,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1429,6 +1434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1772,6 +1778,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1925,6 +1932,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2071,6 +2079,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2167,6 +2176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericCallWithTupleType.json b/crates/swc_ecma_parser/tests/tsc/genericCallWithTupleType.json index 0f4d0579e87f..12c744ead0cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericCallWithTupleType.json +++ b/crates/swc_ecma_parser/tests/tsc/genericCallWithTupleType.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericClassExpressionInFunction.json b/crates/swc_ecma_parser/tests/tsc/genericClassExpressionInFunction.json index 0081f99bd414..bcb668f91a44 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericClassExpressionInFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/genericClassExpressionInFunction.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -239,6 +240,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -377,6 +379,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -477,6 +480,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -545,6 +549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericClassWithFunctionTypedMemberArguments.json b/crates/swc_ecma_parser/tests/tsc/genericClassWithFunctionTypedMemberArguments.json index 7be5198c4fd2..be36f7c816f7 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericClassWithFunctionTypedMemberArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/genericClassWithFunctionTypedMemberArguments.json @@ -260,6 +260,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -304,6 +305,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -533,6 +535,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -699,6 +702,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1081,6 +1085,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1310,6 +1315,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1739,6 +1745,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1761,6 +1768,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1805,6 +1813,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2083,6 +2092,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2384,6 +2394,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2760,6 +2771,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2782,6 +2794,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3040,6 +3053,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3553,6 +3567,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3575,6 +3590,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3619,6 +3635,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3641,6 +3658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4643,6 +4661,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4665,6 +4684,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json b/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json index 31cbab2f4508..7203912c2c5b 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/genericClassWithObjectTypeArgsAndConstraints.json @@ -300,6 +300,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -645,6 +646,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -739,6 +741,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1621,6 +1624,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1683,6 +1687,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2065,6 +2070,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2335,6 +2341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2953,6 +2960,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3191,6 +3199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json index 89811d40e29d..74cde6ea5ef3 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/genericContextualTypes1.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -271,6 +272,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -293,6 +295,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -637,6 +640,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -659,6 +663,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -681,6 +686,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -867,6 +873,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1013,6 +1020,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1143,6 +1151,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1329,6 +1338,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1569,6 +1579,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1591,6 +1602,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1729,6 +1741,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1905,6 +1918,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1927,6 +1941,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2197,6 +2212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2219,6 +2235,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2241,6 +2258,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2473,6 +2491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2636,6 +2655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2837,6 +2857,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3024,6 +3045,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3249,6 +3271,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3575,6 +3598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3839,6 +3863,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4165,6 +4190,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4521,6 +4547,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4543,6 +4570,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4814,6 +4842,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5126,6 +5155,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5367,6 +5397,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5562,6 +5593,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6034,6 +6066,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6356,6 +6389,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6378,6 +6412,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6590,6 +6625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json b/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json index 4791cc1241ba..bdc6c998fc16 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/genericFunctionParameters.json @@ -117,6 +117,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -190,6 +191,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -334,6 +336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -415,6 +418,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -559,6 +563,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -678,6 +683,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1155,6 +1161,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1218,6 +1225,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json b/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json index d36de5aa84e2..ccf0f2605733 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/genericInstantiationEquivalentToObjectLiteral.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -630,6 +632,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -652,6 +655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -849,6 +853,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -871,6 +876,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json b/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json index cb3c18ea701c..a017484128b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json +++ b/crates/swc_ecma_parser/tests/tsc/genericObjectRest.json @@ -722,6 +722,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1162,6 +1163,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1590,6 +1592,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1612,6 +1615,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1661,6 +1665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2178,6 +2183,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2227,6 +2233,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestArity.json b/crates/swc_ecma_parser/tests/tsc/genericRestArity.json index 4145c1967938..213cb1d9c22e 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestArity.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestArity.json @@ -223,6 +223,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestArityStrict.json b/crates/swc_ecma_parser/tests/tsc/genericRestArityStrict.json index 15b80db0e6ae..3f5118d8d505 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestArityStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestArityStrict.json @@ -223,6 +223,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json index 89abbdee8bb8..a6abe607075f 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters1.json @@ -2287,6 +2287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -3525,6 +3526,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -3563,6 +3565,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTupleType", "span": { @@ -3726,6 +3729,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -5000,6 +5004,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -5038,6 +5043,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTupleType", "span": { @@ -5372,6 +5378,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -5410,6 +5417,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5685,6 +5693,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -5723,6 +5732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6007,6 +6017,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6029,6 +6040,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7419,6 +7431,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7441,6 +7454,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -7479,6 +7493,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9004,6 +9019,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9026,6 +9042,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -10024,6 +10041,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10190,6 +10208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10339,6 +10358,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -10513,6 +10533,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -11097,6 +11118,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11430,6 +11452,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json index 9c90248a593f..3c330fe4d2ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters2.json @@ -5289,6 +5289,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6387,6 +6388,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6698,6 +6700,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6797,6 +6800,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6859,6 +6863,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json b/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json index 5b2768aaf0c2..b8ad9169c624 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json +++ b/crates/swc_ecma_parser/tests/tsc/genericRestParameters3.json @@ -1968,6 +1968,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2231,6 +2232,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -2658,6 +2660,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -3050,6 +3053,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3432,6 +3436,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -5209,6 +5214,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/genericSetterInClassType.json b/crates/swc_ecma_parser/tests/tsc/genericSetterInClassType.json index 5750861d2e38..b61e844bb651 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericSetterInClassType.json +++ b/crates/swc_ecma_parser/tests/tsc/genericSetterInClassType.json @@ -258,6 +258,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -738,6 +739,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/genericTypeAliases.json b/crates/swc_ecma_parser/tests/tsc/genericTypeAliases.json index dad28dee9d77..ad51a600a034 100644 --- a/crates/swc_ecma_parser/tests/tsc/genericTypeAliases.json +++ b/crates/swc_ecma_parser/tests/tsc/genericTypeAliases.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -523,6 +524,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -814,6 +816,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -983,6 +986,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1825,6 +1829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2000,6 +2005,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2022,6 +2028,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2186,6 +2193,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2303,6 +2311,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2724,6 +2733,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2992,6 +3002,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3072,6 +3083,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3340,6 +3352,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/grammarAmbiguities.json b/crates/swc_ecma_parser/tests/tsc/grammarAmbiguities.json index c9d04276a922..0e0777ee324c 100644 --- a/crates/swc_ecma_parser/tests/tsc/grammarAmbiguities.json +++ b/crates/swc_ecma_parser/tests/tsc/grammarAmbiguities.json @@ -206,6 +206,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -228,6 +229,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/heterogeneousArrayLiterals.json b/crates/swc_ecma_parser/tests/tsc/heterogeneousArrayLiterals.json index 0e14966423da..645ca5d6e24f 100644 --- a/crates/swc_ecma_parser/tests/tsc/heterogeneousArrayLiterals.json +++ b/crates/swc_ecma_parser/tests/tsc/heterogeneousArrayLiterals.json @@ -3905,6 +3905,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3927,6 +3928,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4840,6 +4842,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4880,6 +4883,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5811,6 +5815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5851,6 +5856,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6884,6 +6890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6924,6 +6931,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures.json index c0edcd64a59b..cce26949d529 100644 --- a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures.json @@ -228,6 +228,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -334,6 +335,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -388,6 +390,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -790,6 +793,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -896,6 +900,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures2.json index 371b3785715e..0ff44b23d535 100644 --- a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures2.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -273,6 +274,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures3.json index e9fe6498802b..aa798742e18e 100644 --- a/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/identicalCallSignatures3.json @@ -223,6 +223,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -340,6 +341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json b/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json index 7e0525db540c..5220052932ec 100644 --- a/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/ifDoWhileStatements.json @@ -595,6 +595,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeGeneric.json b/crates/swc_ecma_parser/tests/tsc/importTypeGeneric.json index 703a5a979294..876d933d508f 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeGeneric.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeGeneric.json @@ -314,6 +314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -551,6 +552,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json b/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json index b2a82d5b573b..ba45faadb699 100644 --- a/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/importTypeGenericTypes.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -298,6 +299,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -538,6 +540,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -957,6 +960,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1822,6 +1826,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json b/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json index ded0b4b2409f..7c483f1f2446 100644 --- a/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json +++ b/crates/swc_ecma_parser/tests/tsc/inOperatorWithValidOperands.json @@ -1043,6 +1043,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1246,6 +1247,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1268,6 +1270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1461,6 +1464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/indexSignatureTypeInference.json b/crates/swc_ecma_parser/tests/tsc/indexSignatureTypeInference.json index 1570533d3339..7726b2794477 100644 --- a/crates/swc_ecma_parser/tests/tsc/indexSignatureTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/indexSignatureTypeInference.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -179,6 +180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -387,6 +389,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -553,6 +556,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json b/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json index 6991a965a67d..6df70bd7a2e0 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json +++ b/crates/swc_ecma_parser/tests/tsc/inferFromBindingPattern.json @@ -56,6 +56,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -147,6 +148,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -257,6 +259,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -640,6 +643,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", @@ -809,6 +813,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -831,6 +836,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1000,6 +1006,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1022,6 +1029,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1351,6 +1359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsTypeReference", @@ -1802,6 +1811,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1951,6 +1961,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", diff --git a/crates/swc_ecma_parser/tests/tsc/inferThisType.json b/crates/swc_ecma_parser/tests/tsc/inferThisType.json index 095eb45fe65d..bdd52e9cff12 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferThisType.json +++ b/crates/swc_ecma_parser/tests/tsc/inferThisType.json @@ -149,6 +149,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -348,6 +349,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -429,6 +431,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -672,6 +675,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -753,6 +757,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/inferTypes2.json b/crates/swc_ecma_parser/tests/tsc/inferTypes2.json index a36e13085b3d..f2f98bcd86e2 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/inferTypes2.json @@ -110,6 +110,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -190,6 +191,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -383,6 +385,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -443,6 +446,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -660,6 +664,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -725,6 +730,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -784,6 +790,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -855,6 +862,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1070,6 +1078,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1139,6 +1148,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1234,6 +1244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json b/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json index c16c6484740a..9b33aa0e99af 100644 --- a/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json +++ b/crates/swc_ecma_parser/tests/tsc/inferingFromAny.json @@ -238,6 +238,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -376,6 +377,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -553,6 +555,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -575,6 +578,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -845,6 +849,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1021,6 +1026,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1198,6 +1204,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1401,6 +1408,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1549,6 +1557,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1698,6 +1707,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1885,6 +1895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2072,6 +2083,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2231,6 +2243,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2253,6 +2266,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2459,6 +2473,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2481,6 +2496,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2809,6 +2825,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2831,6 +2848,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2956,6 +2974,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3097,6 +3116,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3255,6 +3275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3353,6 +3374,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3445,6 +3467,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3467,6 +3490,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3565,6 +3589,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3676,6 +3701,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3698,6 +3724,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3929,6 +3956,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3951,6 +3979,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json index 64c8995497f9..b9ef106279b9 100644 --- a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json +++ b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -322,6 +323,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -966,6 +968,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation2.json b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation2.json index 053a18b0feb7..44ffcbaa7ce5 100644 --- a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation2.json +++ b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughInstantiation2.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json index 505f7d66bd59..92e77442e876 100644 --- a/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/infiniteExpansionThroughTypeInference.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -402,6 +403,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorLocals.json b/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorLocals.json index 5e6c288d5d36..ea610e55de75 100644 --- a/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorLocals.json +++ b/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorLocals.json @@ -719,6 +719,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorParameters.json b/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorParameters.json index df6a34363436..aafb9bd86532 100644 --- a/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/initializerReferencingConstructorParameters.json @@ -776,6 +776,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/innerTypeParameterShadowingOuterOne.json b/crates/swc_ecma_parser/tests/tsc/innerTypeParameterShadowingOuterOne.json index a6dfbd2c5fdb..98033fc9ac04 100644 --- a/crates/swc_ecma_parser/tests/tsc/innerTypeParameterShadowingOuterOne.json +++ b/crates/swc_ecma_parser/tests/tsc/innerTypeParameterShadowingOuterOne.json @@ -198,6 +198,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -359,6 +360,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -576,6 +578,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -616,6 +619,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -777,6 +781,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -817,6 +822,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/innerTypeParameterShadowingOuterOne2.json b/crates/swc_ecma_parser/tests/tsc/innerTypeParameterShadowingOuterOne2.json index dda541294e57..0a21f07e254c 100644 --- a/crates/swc_ecma_parser/tests/tsc/innerTypeParameterShadowingOuterOne2.json +++ b/crates/swc_ecma_parser/tests/tsc/innerTypeParameterShadowingOuterOne2.json @@ -195,6 +195,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -409,6 +410,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -624,6 +626,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -664,6 +667,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -878,6 +882,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -918,6 +923,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/instanceMemberInitialization.json b/crates/swc_ecma_parser/tests/tsc/instanceMemberInitialization.json index 7dcec004d826..14efda74a4f9 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceMemberInitialization.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceMemberInitialization.json @@ -452,6 +452,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -474,6 +475,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -639,6 +641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -661,6 +664,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/instancePropertiesInheritedIntoClassType.json b/crates/swc_ecma_parser/tests/tsc/instancePropertiesInheritedIntoClassType.json index 819eca93f8bb..be76d99877cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/instancePropertiesInheritedIntoClassType.json +++ b/crates/swc_ecma_parser/tests/tsc/instancePropertiesInheritedIntoClassType.json @@ -1367,6 +1367,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1389,6 +1390,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1511,6 +1513,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1533,6 +1536,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/instancePropertyInClassType.json b/crates/swc_ecma_parser/tests/tsc/instancePropertyInClassType.json index b5759924232d..888c8494f660 100644 --- a/crates/swc_ecma_parser/tests/tsc/instancePropertyInClassType.json +++ b/crates/swc_ecma_parser/tests/tsc/instancePropertyInClassType.json @@ -1286,6 +1286,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1308,6 +1309,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithLHSIsTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithLHSIsTypeParameter.json index 3c6962934613..d8374d1c42e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithLHSIsTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/instanceofOperatorWithLHSIsTypeParameter.json @@ -222,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/instantiateGenericClassWithWrongNumberOfTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/instantiateGenericClassWithWrongNumberOfTypeArguments.json index 16f38b2fe825..1d015125188b 100644 --- a/crates/swc_ecma_parser/tests/tsc/instantiateGenericClassWithWrongNumberOfTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/instantiateGenericClassWithWrongNumberOfTypeArguments.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -358,6 +359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -380,6 +382,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/instantiateGenericClassWithZeroTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/instantiateGenericClassWithZeroTypeArguments.json index c3d35cdc511f..ef04f8c31683 100644 --- a/crates/swc_ecma_parser/tests/tsc/instantiateGenericClassWithZeroTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/instantiateGenericClassWithZeroTypeArguments.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -331,6 +332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -353,6 +355,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json index 2421bda6fff5..d884c0f26245 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersection.json @@ -463,6 +463,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1231,6 +1232,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1325,6 +1327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3098,6 +3101,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersectionErrors.json b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersectionErrors.json index ecc86df24c28..ccb03212e2e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersectionErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceExtendsObjectIntersectionErrors.json @@ -326,6 +326,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -910,6 +911,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1004,6 +1006,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2650,6 +2653,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3546,6 +3550,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceThatIndirectlyInheritsFromItself.json b/crates/swc_ecma_parser/tests/tsc/interfaceThatIndirectlyInheritsFromItself.json index fd94eb68fa84..f045b73f5549 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceThatIndirectlyInheritsFromItself.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceThatIndirectlyInheritsFromItself.json @@ -354,6 +354,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -505,6 +506,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -656,6 +658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes.json index 4578ebd4e74d..dfa2df742135 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithMultipleBaseTypes.json @@ -694,6 +694,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -849,6 +850,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1004,6 +1006,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1265,6 +1268,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1287,6 +1291,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1588,6 +1593,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1724,6 +1730,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2005,6 +2012,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json index fb75693d86c0..2aebcbfe6932 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyOfEveryType.json @@ -755,6 +755,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1482,6 +1483,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType.json index 00904741c20a..a951eb998676 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType.json @@ -275,6 +275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -328,6 +329,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType2.json b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType2.json index c90f06719bb6..eb158356c03a 100644 --- a/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType2.json +++ b/crates/swc_ecma_parser/tests/tsc/interfaceWithPropertyThatIsPrivateInBaseType2.json @@ -266,6 +266,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -319,6 +320,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json b/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json index 8cf12b964fca..50bb6d6cf939 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionAsWeakTypeSource.json @@ -630,6 +630,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -813,6 +814,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -927,6 +929,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionMemberOfUnionNarrowsCorrectly.json b/crates/swc_ecma_parser/tests/tsc/intersectionMemberOfUnionNarrowsCorrectly.json index ebcd19c4c904..207700bbea30 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionMemberOfUnionNarrowsCorrectly.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionMemberOfUnionNarrowsCorrectly.json @@ -311,6 +311,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -333,6 +334,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionNarrowing.json b/crates/swc_ecma_parser/tests/tsc/intersectionNarrowing.json index 33fa0030778c..5ab132f383bc 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionNarrowing.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionNarrowing.json @@ -226,6 +226,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -499,6 +500,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -781,6 +783,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1122,6 +1125,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1315,6 +1319,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json b/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json index eb59a77fabf5..98a03b8a93fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionReduction.json @@ -3546,6 +3546,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3568,6 +3569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3600,6 +3602,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3903,6 +3906,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3925,6 +3929,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3957,6 +3962,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -5383,6 +5389,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6944,6 +6951,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -8566,6 +8574,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -9290,6 +9299,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionReductionStrict.json b/crates/swc_ecma_parser/tests/tsc/intersectionReductionStrict.json index af0aa958e2b9..cad485e72bd7 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionReductionStrict.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionReductionStrict.json @@ -3546,6 +3546,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3568,6 +3569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3600,6 +3602,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3903,6 +3906,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3925,6 +3929,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3957,6 +3962,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -6193,6 +6199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json b/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json index 1b505a3b7fd1..241372f63d4b 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionThisTypes.json @@ -1153,6 +1153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json index f92406c3eb31..53348dbaddb3 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference.json @@ -416,6 +416,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -438,6 +439,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -790,6 +792,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -903,6 +906,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1180,6 +1184,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1202,6 +1207,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json index e03ea40197ab..6e7285519def 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference2.json @@ -145,6 +145,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -589,6 +590,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -755,6 +757,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -777,6 +780,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference3.json b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference3.json index eb2c48d17d08..7638bef12cf2 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference3.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionTypeInference3.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -81,6 +82,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -662,6 +664,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionWithIndexSignatures.json b/crates/swc_ecma_parser/tests/tsc/intersectionWithIndexSignatures.json index b3d741ece15d..b81f62ce1bec 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionWithIndexSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionWithIndexSignatures.json @@ -1320,6 +1320,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1342,6 +1343,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1382,6 +1384,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionWithUnionConstraint.json b/crates/swc_ecma_parser/tests/tsc/intersectionWithUnionConstraint.json index dfef1ca50953..238a21f6e2eb 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionWithUnionConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionWithUnionConstraint.json @@ -218,6 +218,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -267,6 +268,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -898,6 +900,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -956,6 +959,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1357,6 +1361,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1610,6 +1615,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1855,6 +1861,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1877,6 +1884,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1956,6 +1964,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1978,6 +1987,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2010,6 +2020,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2238,6 +2249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2326,6 +2338,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2414,6 +2427,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2496,6 +2510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2578,6 +2593,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2610,6 +2626,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIntersectionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json b/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json index cfd5b42c24ea..2bb291cfd766 100644 --- a/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json +++ b/crates/swc_ecma_parser/tests/tsc/intersectionsAndEmptyObjects.json @@ -1882,6 +1882,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1922,6 +1923,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2118,6 +2120,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2866,6 +2869,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -3987,6 +3991,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -4148,6 +4153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json b/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json index 2f2331b4c64c..59af4f7d4906 100644 --- a/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json +++ b/crates/swc_ecma_parser/tests/tsc/intrinsicKeyword.json @@ -228,6 +228,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -288,6 +289,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -366,6 +368,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -434,6 +437,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/intrinsicTypes.json b/crates/swc_ecma_parser/tests/tsc/intrinsicTypes.json index 6a6bfbdc3348..7ee480f328e6 100644 --- a/crates/swc_ecma_parser/tests/tsc/intrinsicTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/intrinsicTypes.json @@ -1639,6 +1639,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1853,6 +1854,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2232,6 +2234,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2727,6 +2730,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2757,6 +2761,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3011,6 +3016,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -3188,6 +3194,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3405,6 +3412,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json b/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json index 8f0b63e5b646..3d1658514edd 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidAssignmentsToVoid.json @@ -843,6 +843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json index e46009478da3..1763599ef220 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidBooleanAssignments.json @@ -1125,6 +1125,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidEnumAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidEnumAssignments.json index cd50f8eef6be..ba3233b78fd0 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidEnumAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidEnumAssignments.json @@ -628,6 +628,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json b/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json index 7286d3ee41ea..150e3fc41615 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidMultipleVariableDeclarations.json @@ -595,6 +595,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json index 544335bd0689..11c1a19dbd44 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidNumberAssignments.json @@ -1032,6 +1032,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json index 543147811e45..7e297a723a89 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidStringAssignments.json @@ -1032,6 +1032,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json index 761fced64b8e..9f696c2d3935 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedAssignments.json @@ -798,6 +798,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json index 17f5c8ca0abd..50bfb817c8a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidUndefinedValues.json @@ -1010,6 +1010,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json b/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json index 0dbfb9d35a4d..2b89aa7b58dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidVoidAssignments.json @@ -1039,6 +1039,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json b/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json index d1dc790c1ec6..c4f199dc47ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json +++ b/crates/swc_ecma_parser/tests/tsc/invalidVoidValues.json @@ -974,6 +974,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json b/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json index ad5728b94e43..00f62b896b16 100644 --- a/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/isomorphicMappedTypeInference.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -163,6 +164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -195,6 +197,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -451,6 +454,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -682,6 +686,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1109,6 +1114,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1564,6 +1570,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1953,6 +1960,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3372,6 +3380,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3482,6 +3491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3504,6 +3514,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -4148,6 +4159,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4676,6 +4688,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4796,6 +4809,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4894,6 +4908,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5014,6 +5029,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5112,6 +5128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5232,6 +5249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5702,6 +5720,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5840,6 +5859,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5872,6 +5892,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6191,6 +6212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6862,6 +6884,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7281,6 +7304,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7303,6 +7327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7507,6 +7532,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7529,6 +7555,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7761,6 +7788,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7783,6 +7811,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7987,6 +8016,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8009,6 +8039,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8058,6 +8089,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8282,6 +8314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8304,6 +8337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8326,6 +8360,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -9253,6 +9288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9275,6 +9311,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall10.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall10.json index 7fbfc08572fe..8b35fbdc9dc2 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall10.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall10.json @@ -164,6 +164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall11.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall11.json index ba21769a4fce..a37261140dd0 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall11.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall11.json @@ -178,6 +178,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall12.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall12.json index bcc7b77b2828..9524695202cb 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall12.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall12.json @@ -155,6 +155,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall7.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall7.json index d2055c69a312..7b87a815550d 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall7.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall7.json @@ -178,6 +178,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall8.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall8.json index 8b2a7c6a4d18..3cb1cf196c94 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall8.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall8.json @@ -155,6 +155,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall9.json b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall9.json index e1cff4ec771d..5f4eb93d3984 100644 --- a/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall9.json +++ b/crates/swc_ecma_parser/tests/tsc/iteratorSpreadInCall9.json @@ -155,6 +155,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json index a8b21c352dd0..e815f168a22b 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassImplementsGenericsSerialization.json @@ -58,6 +58,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassesErr.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassesErr.json index 2d9596371066..67821ceda1ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassesErr.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsClassesErr.json @@ -118,6 +118,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -248,6 +249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json index a7c1d8b56016..12d6f3664d01 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/jsDeclarationsInterfaces.json @@ -176,6 +176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -198,6 +199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -705,6 +707,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -942,6 +945,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1013,6 +1017,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", @@ -1188,6 +1193,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1962,6 +1968,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2083,6 +2090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocAugments_withTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/jsdocAugments_withTypeParameter.json index 30b26625185d..782f2ca86f94 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocAugments_withTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocAugments_withTypeParameter.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/jsdocImplements_namespacedInterface.json b/crates/swc_ecma_parser/tests/tsc/jsdocImplements_namespacedInterface.json index e350a373d1ae..064f012beeb4 100644 --- a/crates/swc_ecma_parser/tests/tsc/jsdocImplements_namespacedInterface.json +++ b/crates/swc_ecma_parser/tests/tsc/jsdocImplements_namespacedInterface.json @@ -149,6 +149,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndForIn.json b/crates/swc_ecma_parser/tests/tsc/keyofAndForIn.json index 69aca8efa905..ee1d9a710d0c 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndForIn.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndForIn.json @@ -71,6 +71,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -565,6 +566,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -595,6 +597,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -667,6 +670,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1216,6 +1220,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1288,6 +1293,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1810,6 +1816,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1832,6 +1839,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json index fc62cd427e99..a17b53e0db38 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess.json @@ -565,6 +565,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -692,6 +693,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1875,6 +1877,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3980,6 +3983,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4002,6 +4006,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4325,6 +4330,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4347,6 +4353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6199,6 +6206,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6504,6 +6512,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6575,6 +6584,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7546,6 +7556,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7568,6 +7579,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8266,6 +8278,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8609,6 +8622,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -8989,6 +9003,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9029,6 +9044,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10315,6 +10331,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10601,6 +10618,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -10623,6 +10641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -11178,6 +11197,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11660,6 +11680,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -11682,6 +11703,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12087,6 +12109,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12419,6 +12442,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -12441,6 +12465,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -12777,6 +12802,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -13024,6 +13050,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -13046,6 +13073,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -13986,6 +14014,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -14008,6 +14037,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -14563,6 +14593,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -14585,6 +14616,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -14607,6 +14639,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -15460,6 +15493,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -15482,6 +15516,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -15504,6 +15539,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -16356,6 +16392,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -16378,6 +16415,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -16400,6 +16438,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -17656,6 +17695,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -18012,6 +18052,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -18674,6 +18715,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -18803,6 +18845,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -19340,6 +19383,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -19605,6 +19649,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -20971,6 +21016,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -21011,6 +21057,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -21471,6 +21518,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -21493,6 +21541,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -21981,6 +22030,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -22003,6 +22053,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -22210,6 +22261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -22475,6 +22527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -23312,6 +23365,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -23334,6 +23388,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -23611,6 +23666,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -23633,6 +23689,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -23682,6 +23739,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -24061,6 +24119,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -24083,6 +24142,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -24132,6 +24192,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -24209,6 +24270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -25933,6 +25995,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -25955,6 +26018,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -26004,6 +26068,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -26213,6 +26278,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -26369,6 +26435,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -26401,6 +26468,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -26653,6 +26721,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -26961,6 +27030,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -26983,6 +27053,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -27340,6 +27411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -27539,6 +27611,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -27561,6 +27634,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -27786,6 +27860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -27808,6 +27883,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -28165,6 +28241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -28365,6 +28442,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -28387,6 +28465,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -28684,6 +28763,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -29076,6 +29156,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -29620,6 +29701,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -29860,6 +29942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -29930,6 +30013,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -30307,6 +30391,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -30990,6 +31075,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -31067,6 +31153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -31502,6 +31589,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -31589,6 +31677,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -31720,6 +31809,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -31982,6 +32072,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -32304,6 +32395,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -32776,6 +32868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -32847,6 +32940,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -33161,6 +33255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -33384,6 +33479,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -33406,6 +33502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -33890,6 +33987,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -34384,6 +34482,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -34406,6 +34505,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -34538,6 +34638,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -34570,6 +34671,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -34816,6 +34918,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsMappedType", "span": { @@ -34843,6 +34946,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -34958,6 +35062,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -35335,6 +35440,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -35367,6 +35473,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -35572,6 +35679,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -35604,6 +35712,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -36037,6 +36146,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -36077,6 +36187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -36271,6 +36382,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -36651,6 +36763,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -36711,6 +36824,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -37160,6 +37274,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -37344,6 +37459,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -37719,6 +37835,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -37759,6 +37876,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -38060,6 +38178,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -38185,6 +38304,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -38315,6 +38435,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -38476,6 +38597,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -38516,6 +38638,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -38595,6 +38718,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -38625,6 +38749,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -38665,6 +38790,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -39052,6 +39178,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -39082,6 +39209,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -39524,6 +39652,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -39554,6 +39683,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -39855,6 +39985,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIntersectionType", "span": { @@ -39890,6 +40021,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -39997,6 +40129,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -40305,6 +40438,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsMappedType", "span": { @@ -40332,6 +40466,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -40414,6 +40549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json index 1cffa96617ac..e3d82455bd82 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccess2.json @@ -1996,6 +1996,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2133,6 +2134,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2537,6 +2539,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2617,6 +2620,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2704,6 +2708,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2898,6 +2903,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3206,6 +3212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3883,6 +3890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3923,6 +3931,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4411,6 +4420,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4951,6 +4961,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5019,6 +5030,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5204,6 +5216,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5327,6 +5340,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5957,6 +5971,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6455,6 +6470,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6734,6 +6750,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6867,6 +6884,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6889,6 +6907,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7069,6 +7088,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7091,6 +7111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7263,6 +7284,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7295,6 +7317,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -7330,6 +7353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7509,6 +7533,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7531,6 +7556,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7588,6 +7614,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8085,6 +8112,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -8543,6 +8571,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8870,6 +8899,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9200,6 +9230,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -9496,6 +9527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9582,6 +9614,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9720,6 +9753,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9806,6 +9840,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9963,6 +9998,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9985,6 +10021,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10063,6 +10100,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10217,6 +10255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -10239,6 +10278,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10317,6 +10357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json index 38131fb97b6e..305d68719dcb 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofAndIndexedAccessErrors.json @@ -258,6 +258,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2780,6 +2781,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2802,6 +2804,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3125,6 +3128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3147,6 +3151,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5148,6 +5153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5170,6 +5176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6285,6 +6292,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6307,6 +6315,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6393,6 +6402,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6433,6 +6443,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6665,6 +6676,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsMappedType", "span": { @@ -6692,6 +6704,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6785,6 +6798,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6862,6 +6876,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7743,6 +7758,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7810,6 +7826,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8073,6 +8090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8095,6 +8113,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8526,6 +8545,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8548,6 +8568,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json b/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json index 986bd74b62f0..2f75b9983ab6 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofInferenceIntersectsResults.json @@ -280,6 +280,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsTypeReference", @@ -492,6 +493,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json b/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json index a8fc2dbfa4dc..31227125885b 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofInferenceLowerPriorityThanReturn.json @@ -315,6 +315,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -337,6 +338,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -572,6 +574,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -594,6 +597,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -647,6 +651,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -677,6 +682,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -725,6 +731,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -879,6 +886,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1156,6 +1164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1384,6 +1393,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2051,6 +2061,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2081,6 +2092,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/keyofIntersection.json b/crates/swc_ecma_parser/tests/tsc/keyofIntersection.json index e0f859abd3c2..03138328bcb9 100644 --- a/crates/swc_ecma_parser/tests/tsc/keyofIntersection.json +++ b/crates/swc_ecma_parser/tests/tsc/keyofIntersection.json @@ -278,6 +278,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -394,6 +395,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -510,6 +512,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -532,6 +535,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -868,6 +872,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -898,6 +903,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1337,6 +1343,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1563,6 +1570,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1593,6 +1601,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1875,6 +1884,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1897,6 +1907,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/libReferenceNoLib.json b/crates/swc_ecma_parser/tests/tsc/libReferenceNoLib.json index ca2e39bb8173..4dbd885be11d 100644 --- a/crates/swc_ecma_parser/tests/tsc/libReferenceNoLib.json +++ b/crates/swc_ecma_parser/tests/tsc/libReferenceNoLib.json @@ -81,6 +81,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/libReferenceNoLibBundle.json b/crates/swc_ecma_parser/tests/tsc/libReferenceNoLibBundle.json index 264b3134f1e6..d20f7172e528 100644 --- a/crates/swc_ecma_parser/tests/tsc/libReferenceNoLibBundle.json +++ b/crates/swc_ecma_parser/tests/tsc/libReferenceNoLibBundle.json @@ -81,6 +81,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json b/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json index 303afe43938b..2ee62fa25fc4 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypeWidening.json @@ -2793,6 +2793,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2923,6 +2924,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -3641,6 +3643,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3772,6 +3775,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4018,6 +4022,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4249,6 +4254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5210,6 +5216,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5571,6 +5578,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5601,6 +5609,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6412,6 +6421,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -6633,6 +6643,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/literalTypes2.json b/crates/swc_ecma_parser/tests/tsc/literalTypes2.json index 59a5ee014ff7..b81ecea53d80 100644 --- a/crates/swc_ecma_parser/tests/tsc/literalTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/literalTypes2.json @@ -7607,6 +7607,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7783,6 +7784,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7959,6 +7961,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7981,6 +7984,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8140,6 +8144,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8324,6 +8329,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -8478,6 +8484,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8616,6 +8623,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8856,6 +8864,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10062,6 +10071,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10411,6 +10421,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes3.json b/crates/swc_ecma_parser/tests/tsc/localTypes3.json index a51ce0f7b891..810f144f930d 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes3.json @@ -241,6 +241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -263,6 +264,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -825,6 +827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -882,6 +885,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1449,6 +1453,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1471,6 +1476,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes4.json b/crates/swc_ecma_parser/tests/tsc/localTypes4.json index a3a998e7f3ea..a310288e595d 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes4.json @@ -158,6 +158,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -524,6 +525,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/localTypes5.json b/crates/swc_ecma_parser/tests/tsc/localTypes5.json index 432e9ae97f97..46b6cde30b8b 100644 --- a/crates/swc_ecma_parser/tests/tsc/localTypes5.json +++ b/crates/swc_ecma_parser/tests/tsc/localTypes5.json @@ -175,6 +175,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -260,6 +261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -331,6 +333,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -353,6 +356,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -530,6 +534,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/logicalAndOperatorWithTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/logicalAndOperatorWithTypeParameters.json index d4a2f69dc3c0..0b89502e1429 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalAndOperatorWithTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalAndOperatorWithTypeParameters.json @@ -863,6 +863,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -885,6 +886,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -907,6 +909,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json index 30b302a873d1..b99574004f63 100644 --- a/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/logicalOrOperatorWithTypeParameters.json @@ -444,6 +444,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -466,6 +467,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1018,6 +1020,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1040,6 +1043,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1062,6 +1066,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1562,6 +1567,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1675,6 +1681,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauseRelationships.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauseRelationships.json index 79084778c282..1dc0fbb35c28 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauseRelationships.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauseRelationships.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -83,6 +84,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -310,6 +312,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -445,6 +448,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -477,6 +481,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -704,6 +709,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -736,6 +742,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1230,6 +1237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1282,6 +1290,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1314,6 +1323,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1541,6 +1551,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1573,6 +1584,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1804,6 +1816,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1836,6 +1849,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2063,6 +2077,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2095,6 +2110,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2771,6 +2787,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json index 3c19700e0bd3..9e2b89636455 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeAsClauses.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -83,6 +84,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIntersectionType", "span": { @@ -557,6 +559,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -596,6 +599,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -759,6 +763,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -845,6 +850,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1526,6 +1532,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1558,6 +1565,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2011,6 +2019,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2043,6 +2052,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIntersectionType", "span": { @@ -2507,6 +2517,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2614,6 +2625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2646,6 +2658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3230,6 +3243,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3252,6 +3266,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3284,6 +3299,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4337,6 +4353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4369,6 +4386,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4779,6 +4797,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4973,6 +4992,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4995,6 +5015,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5049,6 +5070,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5188,6 +5210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5366,6 +5389,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5396,6 +5420,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5418,6 +5443,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5551,6 +5577,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5573,6 +5600,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5613,6 +5641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5848,6 +5877,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5870,6 +5900,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5910,6 +5941,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6148,6 +6180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6170,6 +6203,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6202,6 +6236,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7154,6 +7189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7176,6 +7212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7216,6 +7253,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7916,6 +7954,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7956,6 +7995,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8109,6 +8149,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8149,6 +8190,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8348,6 +8390,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8388,6 +8431,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8577,6 +8621,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8617,6 +8662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8816,6 +8862,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8856,6 +8903,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9029,6 +9077,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9069,6 +9118,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIntersectionType", "span": { @@ -9242,6 +9292,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9264,6 +9315,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9286,6 +9338,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9326,6 +9379,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9525,6 +9579,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9565,6 +9620,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9745,6 +9801,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9785,6 +9842,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9965,6 +10023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10005,6 +10064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10174,6 +10234,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10214,6 +10275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10459,6 +10521,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -10481,6 +10544,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10521,6 +10585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10802,6 +10867,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -10824,6 +10890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10864,6 +10931,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10929,6 +10997,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json index 6348ec63079c..d1803b4cd8f3 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeConstraints.json @@ -250,6 +250,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -592,6 +593,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -954,6 +956,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1067,6 +1070,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1501,6 +1505,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1614,6 +1619,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2010,6 +2016,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2456,6 +2463,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json index 050f78bc91d1..cc32fbfbf361 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors.json @@ -432,6 +432,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -512,6 +513,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -582,6 +584,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1529,6 +1532,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1748,6 +1752,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1994,6 +1999,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2240,6 +2246,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2410,6 +2417,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2557,6 +2565,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2704,6 +2713,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2813,6 +2823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2908,6 +2919,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3055,6 +3067,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3202,6 +3215,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3349,6 +3363,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3467,6 +3482,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3562,6 +3578,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3709,6 +3726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3835,6 +3853,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4013,6 +4032,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4217,6 +4237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5808,6 +5829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5830,6 +5852,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6898,6 +6921,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6969,6 +6993,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8010,6 +8035,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8174,6 +8200,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8196,6 +8223,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8292,6 +8320,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8422,6 +8451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9165,6 +9195,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9187,6 +9218,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9424,6 +9456,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -9446,6 +9479,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors2.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors2.json index d89f2f782e56..38dfb124537e 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors2.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeErrors2.json @@ -181,6 +181,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -240,6 +241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -355,6 +357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -603,6 +606,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -690,6 +694,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -833,6 +838,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -936,6 +942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -1071,6 +1078,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1138,6 +1146,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1223,6 +1232,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { @@ -1358,6 +1368,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1425,6 +1436,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsLiteralType", "span": { @@ -1482,6 +1494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsIndexedAccessType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json index 7e47790c9067..3718681af4c6 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeInferenceErrors.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -83,6 +84,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -486,6 +488,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -508,6 +511,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json index 2d8b7151bb8d..20d6b4a3c1b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeModifiers.json @@ -931,6 +931,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1423,6 +1424,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1657,6 +1659,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1978,6 +1981,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2212,6 +2216,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2533,6 +2538,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3084,6 +3090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3331,6 +3338,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3363,6 +3371,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4747,6 +4756,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5239,6 +5249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5473,6 +5484,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5794,6 +5806,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6028,6 +6041,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6349,6 +6363,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6900,6 +6915,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7993,6 +8009,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeOverlappingStringEnumKeys.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeOverlappingStringEnumKeys.json index 4101b47ac38f..014b9e5ae45b 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeOverlappingStringEnumKeys.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeOverlappingStringEnumKeys.json @@ -604,6 +604,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json index 63b93e83281f..df14be73bbba 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeRelationships.json @@ -211,6 +211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -414,6 +415,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -436,6 +438,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -855,6 +858,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -877,6 +881,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1278,6 +1283,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1300,6 +1306,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1340,6 +1347,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1759,6 +1767,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1781,6 +1790,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2182,6 +2192,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2204,6 +2215,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2244,6 +2256,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2691,6 +2704,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3102,6 +3116,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3124,6 +3139,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3571,6 +3587,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3593,6 +3610,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4022,6 +4040,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4044,6 +4063,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4084,6 +4104,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4531,6 +4552,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4942,6 +4964,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4964,6 +4987,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5411,6 +5435,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5433,6 +5458,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5862,6 +5888,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5884,6 +5911,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5924,6 +5952,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6326,6 +6355,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6617,6 +6647,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6898,6 +6929,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7189,6 +7221,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7698,6 +7731,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8031,6 +8065,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8071,6 +8106,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8150,6 +8186,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8182,6 +8219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8308,6 +8346,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8340,6 +8379,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -8705,6 +8745,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8757,6 +8798,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8789,6 +8831,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9154,6 +9197,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9445,6 +9489,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9517,6 +9562,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9651,6 +9697,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9856,6 +9903,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9928,6 +9976,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10062,6 +10111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10267,6 +10317,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -10289,6 +10340,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10379,6 +10431,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10513,6 +10566,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10718,6 +10772,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -10740,6 +10795,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10830,6 +10886,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10955,6 +11012,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -11160,6 +11218,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -11182,6 +11241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -11281,6 +11341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11406,6 +11467,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -11611,6 +11673,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -11633,6 +11696,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11673,6 +11737,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -11772,6 +11837,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11897,6 +11963,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -12102,6 +12169,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -12124,6 +12192,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12164,6 +12233,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -12263,6 +12333,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12388,6 +12459,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12584,6 +12656,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -12606,6 +12679,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12646,6 +12720,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -12804,6 +12879,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -13061,6 +13137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -13083,6 +13160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -13467,6 +13545,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -13489,6 +13568,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -13538,6 +13618,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -13755,6 +13836,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -13787,6 +13869,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -14008,6 +14091,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -14177,6 +14261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json b/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json index 765c224586a3..f0966dcaf010 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypeWithAny.json @@ -122,6 +122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -154,6 +155,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -325,6 +327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -425,6 +428,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -525,6 +529,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -767,6 +772,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -799,6 +805,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1163,6 +1170,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -1211,6 +1219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1337,6 +1346,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1377,6 +1387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1503,6 +1514,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -2068,6 +2080,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2132,6 +2145,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2389,6 +2403,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2482,6 +2497,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2716,6 +2732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2766,6 +2783,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2854,6 +2872,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2930,6 +2949,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes1.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes1.json index 431ee3161c44..97dcd7c4dcdc 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes1.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes1.json @@ -205,6 +205,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -312,6 +313,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -429,6 +431,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -574,6 +577,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -673,6 +677,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -800,6 +805,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -927,6 +933,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1054,6 +1061,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1181,6 +1189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1327,6 +1336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1482,6 +1492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1561,6 +1572,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1640,6 +1652,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1719,6 +1732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1798,6 +1812,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1877,6 +1892,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1956,6 +1972,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2035,6 +2052,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2114,6 +2132,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2193,6 +2212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2263,6 +2283,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -2370,6 +2391,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -2513,6 +2535,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -2669,6 +2692,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2708,6 +2732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2802,6 +2827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2849,6 +2875,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2943,6 +2970,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2990,6 +3018,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3084,6 +3113,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3141,6 +3171,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json index be0a15b9fafb..e4030e73d529 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes2.json @@ -181,6 +181,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -415,6 +416,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -668,6 +670,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -912,6 +915,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -993,6 +997,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1015,6 +1020,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1064,6 +1070,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1116,6 +1123,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1305,6 +1313,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1337,6 +1346,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1491,6 +1501,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1523,6 +1534,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1803,6 +1815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1923,6 +1936,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2149,6 +2163,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2171,6 +2186,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2524,6 +2540,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2554,6 +2571,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2576,6 +2594,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2753,6 +2772,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json index 655f50e7cf1f..6d14b5f5f510 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes3.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -164,6 +165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -196,6 +198,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -402,6 +405,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -588,6 +592,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json index e7d8a0f670b7..51083e801732 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes4.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -111,6 +112,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -143,6 +145,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -737,6 +740,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1953,6 +1957,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1975,6 +1980,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2007,6 +2013,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2504,6 +2511,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2536,6 +2544,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3379,6 +3388,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3411,6 +3421,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json index 72ca39125d06..d2cbad217d9c 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes5.json @@ -2178,6 +2178,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2353,6 +2354,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2646,6 +2648,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3457,6 +3460,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json b/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json index 9ecab298be37..664423404a7c 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypes6.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -83,6 +84,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -209,6 +211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -241,6 +244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -367,6 +371,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -399,6 +404,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -525,6 +531,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -557,6 +564,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -683,6 +691,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -715,6 +724,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -841,6 +851,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -873,6 +884,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -999,6 +1011,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1031,6 +1044,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1157,6 +1171,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1189,6 +1204,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1315,6 +1331,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1347,6 +1364,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1473,6 +1491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1505,6 +1524,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1631,6 +1651,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1663,6 +1684,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1789,6 +1811,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1821,6 +1844,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1947,6 +1971,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1979,6 +2004,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2105,6 +2131,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2137,6 +2164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2263,6 +2291,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2295,6 +2324,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2421,6 +2451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2453,6 +2484,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3130,6 +3162,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3182,6 +3215,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3214,6 +3248,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4259,6 +4294,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4742,6 +4778,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4794,6 +4831,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4826,6 +4864,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -5503,6 +5542,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json b/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json index 25f38dc785f6..883733b3a814 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesAndObjects.json @@ -339,6 +339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -736,6 +737,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -914,6 +916,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1177,6 +1180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1561,6 +1565,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1757,6 +1762,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1878,6 +1884,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json b/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json index 7c59afd7581d..dd028656c564 100644 --- a/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json +++ b/crates/swc_ecma_parser/tests/tsc/mappedTypesArraysTuples.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -163,6 +164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -195,6 +197,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2366,6 +2369,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2398,6 +2402,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3044,6 +3049,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3885,6 +3891,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4551,6 +4558,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4633,6 +4641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4725,6 +4734,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4757,6 +4767,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4977,6 +4988,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6079,6 +6091,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6147,6 +6160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6229,6 +6243,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6311,6 +6326,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6343,6 +6359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6469,6 +6486,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6986,6 +7004,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -7235,6 +7254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -7303,6 +7323,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7541,6 +7562,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/memberFunctionOverloadMixingStaticAndInstance.json b/crates/swc_ecma_parser/tests/tsc/memberFunctionOverloadMixingStaticAndInstance.json index e634f3ccf2c8..bc3405003168 100644 --- a/crates/swc_ecma_parser/tests/tsc/memberFunctionOverloadMixingStaticAndInstance.json +++ b/crates/swc_ecma_parser/tests/tsc/memberFunctionOverloadMixingStaticAndInstance.json @@ -422,6 +422,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -640,6 +641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPrivateOverloads.json b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPrivateOverloads.json index 6206ef30b079..d0f26b0a3710 100644 --- a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPrivateOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPrivateOverloads.json @@ -2899,6 +2899,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicOverloads.json b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicOverloads.json index aa90b03786fe..82796cc8edaa 100644 --- a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicOverloads.json @@ -2899,6 +2899,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicPrivateOverloads.json b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicPrivateOverloads.json index 07de48bbc53d..b85840adc7c1 100644 --- a/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicPrivateOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/memberFunctionsWithPublicPrivateOverloads.json @@ -4203,6 +4203,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces.json b/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces.json index 26e03a1a07e8..3ef1306ca0e7 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/mergeThreeInterfaces.json @@ -506,6 +506,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -619,6 +620,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -732,6 +734,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1584,6 +1587,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1697,6 +1701,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1810,6 +1815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces.json b/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces.json index 9dc7af2f9883..ef64636d4064 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/mergeTwoInterfaces.json @@ -374,6 +374,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -528,6 +529,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1188,6 +1190,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1301,6 +1304,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames.json index 6ec8ae05f350..20bc995dc530 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames.json @@ -222,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -335,6 +336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -468,6 +470,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -611,6 +614,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -751,6 +755,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -902,6 +907,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames2.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames2.json index 29afbddefe84..c8c9c3d6c6e1 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames2.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithConflictingPropertyNames2.json @@ -222,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -335,6 +336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -478,6 +480,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -621,6 +624,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -771,6 +775,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -922,6 +927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases.json index edd4f898be7b..123d15ef56d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases.json @@ -812,6 +812,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -925,6 +926,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -978,6 +980,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1139,6 +1142,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases2.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases2.json index 15b0f509f318..c5a21ac9f569 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases2.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases2.json @@ -1084,6 +1084,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1197,6 +1198,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1310,6 +1312,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1423,6 +1426,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1476,6 +1480,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1684,6 +1689,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases3.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases3.json index 858a82ecdb61..df92e0ebd285 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases3.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases3.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -224,6 +225,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -337,6 +339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -450,6 +453,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -503,6 +507,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -691,6 +696,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases4.json b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases4.json index ab6eef7fe7ed..656748229a0d 100644 --- a/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases4.json +++ b/crates/swc_ecma_parser/tests/tsc/mergedInterfacesWithMultipleBases4.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -224,6 +225,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -337,6 +339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -450,6 +453,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -503,6 +507,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -691,6 +696,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json index c805bfb23dfa..9ffac7295f59 100644 --- a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads.json @@ -488,6 +488,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -597,6 +598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -730,6 +732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -826,6 +829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json index 40f0cdc43590..27b0529700ba 100644 --- a/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/methodSignaturesWithOverloads2.json @@ -634,6 +634,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -743,6 +744,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -876,6 +878,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -972,6 +975,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.2.json b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.2.json index 78b1b9c431a8..14b3c5102395 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.2.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.2.json @@ -303,6 +303,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsConstructorType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json index 660f51efa8cb..77a7a80d14d1 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClasses.json @@ -303,6 +303,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsConstructorType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json index 7f6da96f7150..d2873c61e452 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAbstractClassesReturnTypeInference.json @@ -462,6 +462,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsConstructorType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json b/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json index 3fa522f5eae2..c4f8c4ec898f 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinAccessModifiers.json @@ -2275,6 +2275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2297,6 +2298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4283,6 +4285,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4433,6 +4436,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json index 81f1bfb4d600..1078b2922fc1 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnnotated.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -910,6 +911,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1565,6 +1567,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnonymous.json b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnonymous.json index 119d48a9d7af..b12adf80ae26 100644 --- a/crates/swc_ecma_parser/tests/tsc/mixinClassesAnonymous.json +++ b/crates/swc_ecma_parser/tests/tsc/mixinClassesAnonymous.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -839,6 +840,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1288,6 +1290,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2476,6 +2479,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json b/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json index 05fcd296b8c3..eaf7e47be52c 100644 --- a/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json +++ b/crates/swc_ecma_parser/tests/tsc/moduleWithStatementsOfEveryKind.json @@ -210,6 +210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -513,6 +514,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1429,6 +1431,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1756,6 +1759,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/multipleNumericIndexers.json b/crates/swc_ecma_parser/tests/tsc/multipleNumericIndexers.json index 8319f8cafde1..6e57db477807 100644 --- a/crates/swc_ecma_parser/tests/tsc/multipleNumericIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/multipleNumericIndexers.json @@ -829,6 +829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -882,6 +883,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/multipleStringIndexers.json b/crates/swc_ecma_parser/tests/tsc/multipleStringIndexers.json index 86a2a02e81ce..a6e59c379de0 100644 --- a/crates/swc_ecma_parser/tests/tsc/multipleStringIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/multipleStringIndexers.json @@ -806,6 +806,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -859,6 +860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/namedTupleMembers.json b/crates/swc_ecma_parser/tests/tsc/namedTupleMembers.json index b9919ad1a4c2..3a1dd035272f 100644 --- a/crates/swc_ecma_parser/tests/tsc/namedTupleMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/namedTupleMembers.json @@ -1156,6 +1156,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -1524,6 +1525,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2986,6 +2988,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -3247,6 +3250,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json b/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json index 72eb6f5386e8..87047fab1072 100644 --- a/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json +++ b/crates/swc_ecma_parser/tests/tsc/narrowingConstrainedTypeVariable.json @@ -340,6 +340,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -735,6 +736,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -775,6 +777,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1283,6 +1286,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/narrowingGenericTypeFromInstanceof01.json b/crates/swc_ecma_parser/tests/tsc/narrowingGenericTypeFromInstanceof01.json index 06653ea72752..e2009fe44e47 100644 --- a/crates/swc_ecma_parser/tests/tsc/narrowingGenericTypeFromInstanceof01.json +++ b/crates/swc_ecma_parser/tests/tsc/narrowingGenericTypeFromInstanceof01.json @@ -126,6 +126,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -183,6 +184,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -324,6 +326,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -464,6 +467,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1022,6 +1026,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/neverInference.json b/crates/swc_ecma_parser/tests/tsc/neverInference.json index 13838888610b..97fbe7163209 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverInference.json +++ b/crates/swc_ecma_parser/tests/tsc/neverInference.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -385,6 +386,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -538,6 +540,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -758,6 +761,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1217,6 +1221,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1688,6 +1693,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json b/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json index fa1989f231db..e7b44750ad5e 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json +++ b/crates/swc_ecma_parser/tests/tsc/neverReturningFunctions1.json @@ -4949,6 +4949,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5941,6 +5942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6509,6 +6511,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6630,6 +6633,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/neverType.json b/crates/swc_ecma_parser/tests/tsc/neverType.json index 89db40bc57bb..556b9300ef40 100644 --- a/crates/swc_ecma_parser/tests/tsc/neverType.json +++ b/crates/swc_ecma_parser/tests/tsc/neverType.json @@ -1318,6 +1318,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/newOperatorConformance.json b/crates/swc_ecma_parser/tests/tsc/newOperatorConformance.json index a7dafb6e778b..ba66bd39b773 100644 --- a/crates/swc_ecma_parser/tests/tsc/newOperatorConformance.json +++ b/crates/swc_ecma_parser/tests/tsc/newOperatorConformance.json @@ -289,6 +289,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1204,6 +1205,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1468,6 +1470,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/newOperatorErrorCases.json b/crates/swc_ecma_parser/tests/tsc/newOperatorErrorCases.json index 274ab3b8704d..7afceb85bf4b 100644 --- a/crates/swc_ecma_parser/tests/tsc/newOperatorErrorCases.json +++ b/crates/swc_ecma_parser/tests/tsc/newOperatorErrorCases.json @@ -289,6 +289,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json b/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json index 4e46656b716a..ce6508793de4 100644 --- a/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json +++ b/crates/swc_ecma_parser/tests/tsc/noUncheckedIndexedAccess.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3849,6 +3850,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -4095,6 +4097,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -4333,6 +4336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6183,6 +6187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6376,6 +6381,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6690,6 +6696,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json index 3689ad5442cb..cdb07aba85ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -237,6 +239,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -557,6 +560,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -611,6 +615,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -929,6 +934,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter2.json b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter2.json index 61a6fa1b8906..e472e38795d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter2.json +++ b/crates/swc_ecma_parser/tests/tsc/nominalSubtypeCheckOfTypeParameter2.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -164,6 +165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -325,6 +327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -504,6 +507,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -617,6 +621,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/nonGenericTypeReferenceWithTypeArguments.json b/crates/swc_ecma_parser/tests/tsc/nonGenericTypeReferenceWithTypeArguments.json index fd0bf3987af0..8c21b141fa04 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonGenericTypeReferenceWithTypeArguments.json +++ b/crates/swc_ecma_parser/tests/tsc/nonGenericTypeReferenceWithTypeArguments.json @@ -970,6 +970,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json index 3de2287d6566..6f486ecd9918 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveAndTypeVariables.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -105,6 +107,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -294,6 +297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -316,6 +320,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -348,6 +353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1174,6 +1180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1196,6 +1203,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json index d195dafab0c4..db51f09d164d 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveConstraintOfIndexAccessType.json @@ -214,6 +214,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -244,6 +245,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -502,6 +504,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -532,6 +535,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -790,6 +794,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -820,6 +825,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1078,6 +1084,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1108,6 +1115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1366,6 +1374,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1396,6 +1405,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1654,6 +1664,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1684,6 +1695,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1942,6 +1954,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1972,6 +1985,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2230,6 +2244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2260,6 +2275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2518,6 +2534,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2590,6 +2607,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2848,6 +2866,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2935,6 +2954,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json index e515b008180f..1e02ada09447 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveInGeneric.json @@ -170,6 +170,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -663,6 +664,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -903,6 +905,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1276,6 +1279,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1336,6 +1340,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveStrictNull.json b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveStrictNull.json index 1409dcc6b7f1..be09257ee3f0 100644 --- a/crates/swc_ecma_parser/tests/tsc/nonPrimitiveStrictNull.json +++ b/crates/swc_ecma_parser/tests/tsc/nonPrimitiveStrictNull.json @@ -1527,6 +1527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json index 285d92a6766d..8031517ffdab 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/nullAssignableToEveryType.json @@ -1454,6 +1454,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1939,6 +1940,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1961,6 +1963,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1983,6 +1986,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json b/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json index a48952ea2b37..36e3005c1ead 100644 --- a/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json +++ b/crates/swc_ecma_parser/tests/tsc/nullIsSubtypeOfEverythingButUndefined.json @@ -1502,6 +1502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1677,6 +1678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2324,6 +2326,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3780,6 +3783,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4027,6 +4031,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4049,6 +4054,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json index 52ea2b9d2800..e283e79aa27d 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralContextualTyping.json @@ -1023,6 +1023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.json b/crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.json index b8034b9a0eb6..659e40f3386b 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.json +++ b/crates/swc_ecma_parser/tests/tsc/objectLiteralNormalization.json @@ -2869,6 +2869,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json b/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json index 447ad63a020f..04897fbf7199 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json +++ b/crates/swc_ecma_parser/tests/tsc/objectRestNegative.json @@ -838,6 +838,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectSpread.json b/crates/swc_ecma_parser/tests/tsc/objectSpread.json index e23e2293442a..9557303e7ec2 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectSpread.json +++ b/crates/swc_ecma_parser/tests/tsc/objectSpread.json @@ -7575,6 +7575,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7597,6 +7598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10835,6 +10837,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -10857,6 +10860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedProperty.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedProperty.json index fbac041e9201..6d82bf34cf77 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedProperty.json @@ -222,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedProperty2.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedProperty2.json index fbac041e9201..6d82bf34cf77 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedProperty2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedProperty2.json @@ -222,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedPropertyCheckedNominally.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedPropertyCheckedNominally.json index 76c21afde7d0..20b631c58999 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedPropertyCheckedNominally.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithRecursiveWrappedPropertyCheckedNominally.json @@ -222,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -446,6 +447,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1654,6 +1656,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1712,6 +1715,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2289,6 +2293,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2329,6 +2334,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json index d25aff10a1aa..200c7321c6f6 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypeWithStringAndNumberIndexSignatureToAny.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -179,6 +180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -307,6 +309,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json index 504a6f94463a..459ff4828ba0 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity.json @@ -255,6 +255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json index c96ab57c7833..85a0f13eddf7 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentity2.json @@ -255,6 +255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json index 1fc5c69f3d4b..ea56f1076c2b 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures.json @@ -478,6 +478,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -630,6 +631,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json index f6dfcb3a9c24..86a4b70297d6 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures2.json @@ -478,6 +478,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -630,6 +631,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures3.json index da51bcdc21e0..796b87b969d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignatures3.json @@ -137,6 +137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json index c6cb25f6fc7f..65836278be47 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts.json @@ -560,6 +560,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -712,6 +713,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.json index 23472c5b9707..01c05a2d8290 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesDifferingParamCounts2.json @@ -137,6 +137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json index 50da3347e162..fcc4a35462e8 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithCallSignaturesWithOverloads.json @@ -1115,6 +1115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1335,6 +1336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithComplexConstraints.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithComplexConstraints.json index 05b07c436540..4c39ce807fe7 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithComplexConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithComplexConstraints.json @@ -161,6 +161,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -296,6 +297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -485,6 +487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures.json index 645ef5ebfef0..fa7affd9cf28 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures.json @@ -321,6 +321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -444,6 +445,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures2.json index 37545587afdf..5d138967bd33 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignatures2.json @@ -261,6 +261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -400,6 +401,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.json index 404927d31d9e..d56f4c6140b3 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithConstructSignaturesDifferingParamCounts.json @@ -343,6 +343,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -482,6 +483,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json index 8ff672bde254..884847986816 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures.json @@ -153,6 +153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -386,6 +387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -580,6 +582,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -633,6 +636,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -879,6 +883,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1042,6 +1047,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1216,6 +1222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json index da9a859b4954..4926191750b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignatures2.json @@ -199,6 +199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -221,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -500,6 +502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -522,6 +525,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -762,6 +766,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -784,6 +789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -837,6 +843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -859,6 +866,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1179,6 +1187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1201,6 +1210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1401,6 +1411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1423,6 +1434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1643,6 +1655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1665,6 +1678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json index 0cb488b9f7c9..d08494983fb8 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints.json @@ -153,6 +153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -384,6 +385,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -604,6 +606,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -675,6 +678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -919,6 +923,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1090,6 +1095,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1300,6 +1306,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json index 18fc8b75f8a8..cbbb1d0e2ff4 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints2.json @@ -199,6 +199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -239,6 +240,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -516,6 +518,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -556,6 +559,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -822,6 +826,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -862,6 +867,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1110,6 +1116,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1150,6 +1157,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1221,6 +1229,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1261,6 +1270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1579,6 +1589,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1619,6 +1630,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1827,6 +1839,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1867,6 +1880,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2123,6 +2137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2163,6 +2178,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json index c6cd57b49976..ec03bbef7894 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByConstraints3.json @@ -267,6 +267,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -380,6 +381,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -489,6 +491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -511,6 +514,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -772,6 +776,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -812,6 +817,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1089,6 +1095,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1129,6 +1136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1377,6 +1385,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1417,6 +1426,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1665,6 +1675,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1705,6 +1716,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1794,6 +1806,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1834,6 +1847,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2170,6 +2184,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2210,6 +2225,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2445,6 +2461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2485,6 +2502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2723,6 +2741,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2763,6 +2782,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json index ead9152d18ab..8d594db49fa0 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType.json @@ -153,6 +153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -366,6 +367,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -550,6 +552,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -603,6 +606,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -849,6 +853,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1012,6 +1017,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1184,6 +1190,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json index af598ede9931..1daaf5346d87 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingByReturnType2.json @@ -153,6 +153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -384,6 +385,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -586,6 +588,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -657,6 +660,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -921,6 +925,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1102,6 +1107,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1292,6 +1298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json index e66eab8c33b3..d2f9328dc086 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts.json @@ -153,6 +153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -386,6 +387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -408,6 +410,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -602,6 +605,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -624,6 +628,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -646,6 +651,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -699,6 +705,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -721,6 +728,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -743,6 +751,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -765,6 +774,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1011,6 +1021,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1033,6 +1044,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1055,6 +1067,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1077,6 +1090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1240,6 +1254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1262,6 +1277,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1284,6 +1300,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1306,6 +1323,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1328,6 +1346,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1502,6 +1521,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1524,6 +1544,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1546,6 +1567,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1568,6 +1590,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1590,6 +1613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1612,6 +1636,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.json index 63d7419e2c60..25757f474ce7 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterCounts2.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -95,6 +97,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -117,6 +120,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -337,6 +341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -359,6 +364,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -381,6 +387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -403,6 +410,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -553,6 +561,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -575,6 +584,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -597,6 +607,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -619,6 +630,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -641,6 +653,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json index 0cf44c640d2c..248fabcd4100 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesDifferingTypeParameterNames.json @@ -153,6 +153,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -386,6 +387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -580,6 +582,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -633,6 +636,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -879,6 +883,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1042,6 +1047,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1216,6 +1222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json index ab1f47ab0394..3200eb63584e 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams.json @@ -199,6 +199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -478,6 +479,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -718,6 +720,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -771,6 +774,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1091,6 +1095,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1291,6 +1296,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1511,6 +1517,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json index 2b1c82c68ffc..b6e53b19d573 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams2.json @@ -199,6 +199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -221,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -500,6 +502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -522,6 +525,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -762,6 +766,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -784,6 +789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -837,6 +843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -859,6 +866,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1179,6 +1187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1201,6 +1210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1401,6 +1411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1423,6 +1434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1643,6 +1655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1665,6 +1678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json index 3947cb97a2c1..8c093f40ed1f 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericCallSignaturesOptionalParams3.json @@ -199,6 +199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -221,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -500,6 +502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -522,6 +525,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -762,6 +766,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -784,6 +789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -837,6 +843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -859,6 +866,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1179,6 +1187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1201,6 +1210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1401,6 +1411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1423,6 +1434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1643,6 +1655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1665,6 +1678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.json index 7843a8ed938f..c5ed083f6018 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints.json @@ -150,6 +150,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -338,6 +339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -409,6 +411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -627,6 +630,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -785,6 +789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -995,6 +1000,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.json index 007f493adfd5..715e6b222872 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints2.json @@ -196,6 +196,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -236,6 +237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -470,6 +472,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -510,6 +513,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -726,6 +730,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -766,6 +771,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -837,6 +843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -877,6 +884,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1169,6 +1177,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1209,6 +1218,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1404,6 +1414,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1444,6 +1455,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1700,6 +1712,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1740,6 +1753,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json index 5de5e66e3ddd..1e5b83be4c5a 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByConstraints3.json @@ -267,6 +267,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -380,6 +381,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -489,6 +491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -511,6 +514,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -769,6 +773,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -809,6 +814,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1025,6 +1031,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1065,6 +1072,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1281,6 +1289,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1321,6 +1330,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1410,6 +1420,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1450,6 +1461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1760,6 +1772,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1800,6 +1813,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2022,6 +2036,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2062,6 +2077,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2300,6 +2316,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2340,6 +2357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.json index 99fa0d448181..b718d1fcc24f 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType.json @@ -150,6 +150,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -302,6 +303,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -355,6 +357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -575,6 +578,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -725,6 +729,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -897,6 +902,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.json index 5849d2fc2b9b..d71cabbed044 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingByReturnType2.json @@ -150,6 +150,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -320,6 +321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -391,6 +393,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -629,6 +632,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -797,6 +801,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -987,6 +992,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.json index 50f2bdfb7ef8..1d263047b77e 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterCounts.json @@ -150,6 +150,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -172,6 +173,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -324,6 +326,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -346,6 +349,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -368,6 +372,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -421,6 +426,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -443,6 +449,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -465,6 +472,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -487,6 +495,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -820,6 +829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -842,6 +852,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -864,6 +875,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -886,6 +898,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1102,6 +1115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1124,6 +1138,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1146,6 +1161,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1168,6 +1184,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1190,6 +1207,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1364,6 +1382,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1386,6 +1405,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1408,6 +1428,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1430,6 +1451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1452,6 +1474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1474,6 +1497,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.json index d82aa972d9ad..4ba65d10b70c 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesDifferingTypeParameterNames.json @@ -150,6 +150,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -302,6 +303,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -355,6 +357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -631,6 +634,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -809,6 +813,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1035,6 +1040,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.json index 0fa9837076e1..783efcf2bba5 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams.json @@ -196,6 +196,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -394,6 +395,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -447,6 +449,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -797,6 +800,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1012,6 +1016,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1297,6 +1302,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.json index 70a3aa70a435..83cede7733d8 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams2.json @@ -196,6 +196,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -218,6 +219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -416,6 +418,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -438,6 +441,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -491,6 +495,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -513,6 +518,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -901,6 +907,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -923,6 +930,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1157,6 +1165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1179,6 +1188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1483,6 +1493,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1505,6 +1516,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.json index cd36ec863982..3b16ba820826 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithGenericConstructSignaturesOptionalParams3.json @@ -196,6 +196,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -218,6 +219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -416,6 +418,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -438,6 +441,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -491,6 +495,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -513,6 +518,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -901,6 +907,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -923,6 +930,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1157,6 +1165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1179,6 +1188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1483,6 +1493,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1505,6 +1516,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers1.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers1.json index e1b0b40a0598..61f208256cfb 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers1.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers1.json @@ -288,6 +288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers2.json index af8db60d6b1a..be16f750c8c1 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers2.json @@ -461,6 +461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers3.json index 561d14eb0443..8c3326ec6f78 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithNumericIndexers3.json @@ -288,6 +288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json index 3739ca89f35b..1bfd00cc59e6 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithOptionality.json @@ -255,6 +255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json index 4e0d38bd3e99..52c2b81263d3 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates.json @@ -255,6 +255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates2.json index fa2824be1285..e53af3c693ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates2.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -177,6 +178,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates3.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates3.json index 103cfea66fe4..a414f4209e37 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates3.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPrivates3.json @@ -171,6 +171,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -509,6 +510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json index e84a1edf5600..4e366edb9295 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithPublics.json @@ -255,6 +255,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers.json index 2916188ef228..832b9ceb0b18 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers.json @@ -288,6 +288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers2.json b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers2.json index 3ac23de886d4..44803337d3f6 100644 --- a/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers2.json +++ b/crates/swc_ecma_parser/tests/tsc/objectTypesIdentityWithStringIndexers2.json @@ -461,6 +461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json b/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json index c17a79bb5f39..f404fe0af79a 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalChainingInference.json @@ -164,6 +164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/optionalPropertyAssignableToStringIndexSignature.json b/crates/swc_ecma_parser/tests/tsc/optionalPropertyAssignableToStringIndexSignature.json index b233467b3f47..41ebce8433a2 100644 --- a/crates/swc_ecma_parser/tests/tsc/optionalPropertyAssignableToStringIndexSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/optionalPropertyAssignableToStringIndexSignature.json @@ -1151,6 +1151,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/overloadResolution.json b/crates/swc_ecma_parser/tests/tsc/overloadResolution.json index e061ed1b5fc7..79ee450b47db 100644 --- a/crates/swc_ecma_parser/tests/tsc/overloadResolution.json +++ b/crates/swc_ecma_parser/tests/tsc/overloadResolution.json @@ -915,6 +915,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1481,6 +1482,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1683,6 +1685,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1705,6 +1708,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1927,6 +1931,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1949,6 +1954,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1971,6 +1977,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2891,6 +2898,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2921,6 +2929,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3079,6 +3088,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3109,6 +3119,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/overloadResolutionClassConstructors.json b/crates/swc_ecma_parser/tests/tsc/overloadResolutionClassConstructors.json index 057854a8f147..3d89a35fb797 100644 --- a/crates/swc_ecma_parser/tests/tsc/overloadResolutionClassConstructors.json +++ b/crates/swc_ecma_parser/tests/tsc/overloadResolutionClassConstructors.json @@ -840,6 +840,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1633,6 +1634,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1655,6 +1657,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1677,6 +1680,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2390,6 +2394,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2420,6 +2425,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/overloadResolutionConstructors.json b/crates/swc_ecma_parser/tests/tsc/overloadResolutionConstructors.json index be086fd25102..41e7bfdc1f14 100644 --- a/crates/swc_ecma_parser/tests/tsc/overloadResolutionConstructors.json +++ b/crates/swc_ecma_parser/tests/tsc/overloadResolutionConstructors.json @@ -895,6 +895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1464,6 +1465,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1634,6 +1636,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1656,6 +1659,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1826,6 +1830,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1848,6 +1853,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1870,6 +1876,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2780,6 +2787,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2810,6 +2818,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2935,6 +2944,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2965,6 +2975,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/override19.json b/crates/swc_ecma_parser/tests/tsc/override19.json index 658e7840d71d..b00f28cecf9b 100644 --- a/crates/swc_ecma_parser/tests/tsc/override19.json +++ b/crates/swc_ecma_parser/tests/tsc/override19.json @@ -239,6 +239,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -279,6 +280,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json b/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json index 52ad005faafc..441856ea9bf0 100644 --- a/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json +++ b/crates/swc_ecma_parser/tests/tsc/overrideInterfaceProperty.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -470,6 +472,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -492,6 +495,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parametersWithNoAnnotationAreAny.json b/crates/swc_ecma_parser/tests/tsc/parametersWithNoAnnotationAreAny.json index 1339509f2482..e470da7f4f29 100644 --- a/crates/swc_ecma_parser/tests/tsc/parametersWithNoAnnotationAreAny.json +++ b/crates/swc_ecma_parser/tests/tsc/parametersWithNoAnnotationAreAny.json @@ -339,6 +339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json index cadd614f06bd..2fad314dcee4 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping1.json @@ -205,6 +205,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -539,6 +540,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -822,6 +824,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json index f396d38d28fb..8d45757fb549 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping2.json @@ -122,6 +122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -331,6 +332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -553,6 +555,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -722,6 +725,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping3.json b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping3.json index abdc9c89528b..96208d137f6d 100644 --- a/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping3.json +++ b/crates/swc_ecma_parser/tests/tsc/parenthesizedContexualTyping3.json @@ -251,6 +251,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -631,6 +632,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -960,6 +962,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserAccessibilityAfterStatic14.json b/crates/swc_ecma_parser/tests/tsc/parserAccessibilityAfterStatic14.json index 9ba0da73be05..6766f33a8e38 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserAccessibilityAfterStatic14.json +++ b/crates/swc_ecma_parser/tests/tsc/parserAccessibilityAfterStatic14.json @@ -89,6 +89,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserCastVersusArrowFunction1.json b/crates/swc_ecma_parser/tests/tsc/parserCastVersusArrowFunction1.json index 6da2ab9b6f5f..41917fa3e6e9 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserCastVersusArrowFunction1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserCastVersusArrowFunction1.json @@ -81,6 +81,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -248,6 +249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -357,6 +359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -504,6 +507,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration25.json b/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration25.json index e522f63c4324..9a0e40d7df9b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration25.json +++ b/crates/swc_ecma_parser/tests/tsc/parserClassDeclaration25.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -326,6 +327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserFunctionPropertyAssignment4.json b/crates/swc_ecma_parser/tests/tsc/parserFunctionPropertyAssignment4.json index b38f04ff1411..01f3e28b09d9 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserFunctionPropertyAssignment4.json +++ b/crates/swc_ecma_parser/tests/tsc/parserFunctionPropertyAssignment4.json @@ -99,6 +99,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericClass1.json b/crates/swc_ecma_parser/tests/tsc/parserGenericClass1.json index 7fb1368e3256..a98ec54cc85d 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericClass1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericClass1.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericClass2.json b/crates/swc_ecma_parser/tests/tsc/parserGenericClass2.json index 785667bf295d..ae7423031f10 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericClass2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericClass2.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -77,6 +78,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint1.json b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint1.json index b282af5bb8e3..61206dc4a1ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint1.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint2.json b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint2.json index 67412048ecd0..c81474576683 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint2.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint2.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint3.json b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint3.json index 4cf6e5219d7b..bf251a8aeafd 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint3.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint3.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint4.json b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint4.json index df57e42ce6f9..ccc4c51cad1e 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint4.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint4.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint5.json b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint5.json index 5626d948e471..4ae711adaa03 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint5.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint5.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint6.json b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint6.json index ffb0defd8b2a..9d5d550c2c83 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint6.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint6.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint7.json b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint7.json index 8ecbb05e2317..52ea19bfb16c 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint7.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericConstraint7.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/parserGenericsInInterfaceDeclaration1.json b/crates/swc_ecma_parser/tests/tsc/parserGenericsInInterfaceDeclaration1.json index be6d2b924a17..57543d759c18 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGenericsInInterfaceDeclaration1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGenericsInInterfaceDeclaration1.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -219,6 +220,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -300,6 +302,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -358,6 +361,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -416,6 +420,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserGetAccessorWithTypeParameters1.json b/crates/swc_ecma_parser/tests/tsc/parserGetAccessorWithTypeParameters1.json index eda2d61db392..4f421c3b7a2f 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserGetAccessorWithTypeParameters1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserGetAccessorWithTypeParameters1.json @@ -89,6 +89,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature11.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature11.json index e75a1e380369..575536364c8a 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature11.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature11.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature12.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature12.json index 9c428271aa36..306206667f13 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature12.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature12.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature3.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature3.json index 571e591fc2d7..c8b7ecf2d7d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature3.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature3.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature4.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature4.json index 27cebcc4446f..e2ba74265866 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature4.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature4.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature7.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature7.json index 30cc39fcfdc0..425376018d9f 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature7.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature7.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature8.json b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature8.json index 5a9f164e2e9d..78e0f4ace31c 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserMethodSignature8.json +++ b/crates/swc_ecma_parser/tests/tsc/parserMethodSignature8.json @@ -83,6 +83,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/parserSetAccessorWithTypeParameters1.json b/crates/swc_ecma_parser/tests/tsc/parserSetAccessorWithTypeParameters1.json index 4381d38f06cd..a7301cae303b 100644 --- a/crates/swc_ecma_parser/tests/tsc/parserSetAccessorWithTypeParameters1.json +++ b/crates/swc_ecma_parser/tests/tsc/parserSetAccessorWithTypeParameters1.json @@ -110,6 +110,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.json b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.json index 986d4f81e531..b1cc7672f9f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.json +++ b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceError.json @@ -339,6 +339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.json index 7ad157ae9482..67f3181b1f3c 100644 --- a/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/partiallyAnnotatedFunctionInferenceWithTypeParameter.json @@ -339,6 +339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -629,6 +630,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameEmitHelpers.json b/crates/swc_ecma_parser/tests/tsc/privateNameEmitHelpers.json index 8a53e7e558d3..f21c5b223841 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameEmitHelpers.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameEmitHelpers.json @@ -494,6 +494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -524,6 +525,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -744,6 +746,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -774,6 +777,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/privateNameStaticEmitHelpers.json b/crates/swc_ecma_parser/tests/tsc/privateNameStaticEmitHelpers.json index 04812e746fbd..44d6c06f9150 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNameStaticEmitHelpers.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNameStaticEmitHelpers.json @@ -450,6 +450,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -480,6 +481,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -700,6 +702,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -730,6 +733,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesAndDecorators.json b/crates/swc_ecma_parser/tests/tsc/privateNamesAndDecorators.json index 9d672aa6ae30..aa45698aef19 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesAndDecorators.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesAndDecorators.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesAndGenericClasses-2.json b/crates/swc_ecma_parser/tests/tsc/privateNamesAndGenericClasses-2.json index a523a3f9b7a3..d292ac5a5449 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesAndGenericClasses-2.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesAndGenericClasses-2.json @@ -721,6 +721,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesConstructorChain-2.json b/crates/swc_ecma_parser/tests/tsc/privateNamesConstructorChain-2.json index ba976b1dc728..5a485d55c670 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesConstructorChain-2.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesConstructorChain-2.json @@ -307,6 +307,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -462,6 +463,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/privateNamesInGenericClasses.json b/crates/swc_ecma_parser/tests/tsc/privateNamesInGenericClasses.json index b6f0d73a7d36..77f3bc08d869 100644 --- a/crates/swc_ecma_parser/tests/tsc/privateNamesInGenericClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/privateNamesInGenericClasses.json @@ -1970,6 +1970,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.json index 77ee82ac2401..57877a8a6c54 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessChain.json @@ -1346,6 +1346,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints.json index c581c4ae9a0a..84fe282f6a38 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints.json @@ -305,6 +305,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -492,6 +493,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -952,6 +954,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1457,6 +1460,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json index 36b653ef937f..e93d24eea783 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints2.json @@ -767,6 +767,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -807,6 +808,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1172,6 +1174,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1212,6 +1215,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1691,6 +1695,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1731,6 +1736,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1855,6 +1861,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1895,6 +1902,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2056,6 +2064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2096,6 +2105,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2931,6 +2941,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2971,6 +2982,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json index a47902fc1348..7b8d406140bd 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints3.json @@ -767,6 +767,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -807,6 +808,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1172,6 +1174,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1212,6 +1215,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1691,6 +1695,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1731,6 +1736,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1855,6 +1861,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1895,6 +1902,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2588,6 +2596,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2628,6 +2637,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints4.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints4.json index e0ba674b3e24..e52b60257234 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints4.json @@ -305,6 +305,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -492,6 +493,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -952,6 +954,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1461,6 +1464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints5.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints5.json index ee22ca9aa671..3a3b79459e31 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints5.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithConstraints5.json @@ -577,6 +577,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -617,6 +618,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -823,6 +825,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -863,6 +866,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1342,6 +1346,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1382,6 +1387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1891,6 +1897,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1931,6 +1938,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithoutConstraints.json b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithoutConstraints.json index e7385e462f87..bb2d248d18ea 100644 --- a/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithoutConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/propertyAccessOnTypeParameterWithoutConstraints.json @@ -305,6 +305,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -464,6 +465,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -896,6 +898,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1387,6 +1390,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/recurringTypeParamForContainerOfBase01.json b/crates/swc_ecma_parser/tests/tsc/recurringTypeParamForContainerOfBase01.json index 778a80ce9682..230f4dae4011 100644 --- a/crates/swc_ecma_parser/tests/tsc/recurringTypeParamForContainerOfBase01.json +++ b/crates/swc_ecma_parser/tests/tsc/recurringTypeParamForContainerOfBase01.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -210,6 +211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -369,6 +371,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveIntersectionTypes.json b/crates/swc_ecma_parser/tests/tsc/recursiveIntersectionTypes.json index d33c3cb6a518..b6a1c74d00dc 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveIntersectionTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveIntersectionTypes.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json b/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json index aa7adf51de45..986195274cfe 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveMappedTypes.json @@ -52,6 +52,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -179,6 +180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -306,6 +308,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -439,6 +442,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -471,6 +475,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -854,6 +859,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -892,6 +898,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -924,6 +931,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1507,6 +1515,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1539,6 +1548,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2087,6 +2097,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2119,6 +2130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2273,6 +2285,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2340,6 +2353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2644,6 +2658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2684,6 +2699,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2884,6 +2900,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2916,6 +2933,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3521,6 +3539,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3543,6 +3562,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3680,6 +3700,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3779,6 +3800,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3801,6 +3823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4100,6 +4123,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4149,6 +4173,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4171,6 +4196,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", @@ -4379,6 +4405,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4529,6 +4556,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4621,6 +4649,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4679,6 +4708,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsInferType", "span": { @@ -4705,6 +4735,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypeInGenericConstraint.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypeInGenericConstraint.json index ed4dfe73025c..d0fead7a9f9c 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypeInGenericConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypeInGenericConstraint.json @@ -167,6 +167,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -280,6 +281,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -495,6 +497,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json index b17754dc3736..56f82bbb5d17 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypeReferences1.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1388,6 +1389,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2960,6 +2962,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3195,6 +3198,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3438,6 +3442,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3738,6 +3743,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5732,6 +5738,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5883,6 +5890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6018,6 +6026,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6233,6 +6242,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6454,6 +6464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6589,6 +6600,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6804,6 +6816,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypesUsedAsFunctionParameters.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypesUsedAsFunctionParameters.json index 46e1fa2e402d..1351fa9cfea6 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypesUsedAsFunctionParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypesUsedAsFunctionParameters.json @@ -222,6 +222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -446,6 +447,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -579,6 +581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -711,6 +714,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -851,6 +855,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -983,6 +988,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1115,6 +1121,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1217,6 +1224,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1349,6 +1357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1489,6 +1498,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1593,6 +1603,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1733,6 +1744,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1837,6 +1849,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1985,6 +1998,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2133,6 +2147,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2268,6 +2283,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2608,6 +2624,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2676,6 +2693,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json b/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json index 2a7e494f7ccc..a5ca3a60a547 100644 --- a/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json +++ b/crates/swc_ecma_parser/tests/tsc/recursiveTypesWithTypeof.json @@ -375,6 +375,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1396,6 +1397,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeQuery", "span": { @@ -1938,6 +1940,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeQuery", "span": { @@ -2836,6 +2839,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2858,6 +2862,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/restTuplesFromContextualTypes.json b/crates/swc_ecma_parser/tests/tsc/restTuplesFromContextualTypes.json index e30c1b743ff3..8ab9404d024f 100644 --- a/crates/swc_ecma_parser/tests/tsc/restTuplesFromContextualTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/restTuplesFromContextualTypes.json @@ -5211,6 +5211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -5401,6 +5402,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -5439,6 +5441,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6367,6 +6370,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6405,6 +6409,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6427,6 +6432,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json index d95bfedfc985..4fb8cc945278 100644 --- a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsNotSubtypeOfNonSpecializedSignature.json @@ -720,6 +720,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1030,6 +1031,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1332,6 +1334,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1614,6 +1617,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2282,6 +2286,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2436,6 +2441,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2614,6 +2620,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2768,6 +2775,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json index 5b2e12a45ac6..e512dddd941d 100644 --- a/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/specializedSignatureIsSubtypeOfNonSpecializedSignature.json @@ -858,6 +858,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1243,6 +1244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1636,6 +1638,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2009,6 +2012,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2898,6 +2902,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3104,6 +3109,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3282,6 +3288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3527,6 +3534,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json b/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json index 719685dc0e4a..4a5b98c1129f 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadObjectOrFalsy.json @@ -167,6 +167,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -364,6 +365,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -513,6 +515,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -689,6 +692,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -875,6 +879,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -897,6 +902,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1054,6 +1060,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1292,6 +1299,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1322,6 +1330,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1490,6 +1499,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1989,6 +1999,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/spreadTypeVariable.json b/crates/swc_ecma_parser/tests/tsc/spreadTypeVariable.json index 01b0c0e9a932..8ece9da1d9c7 100644 --- a/crates/swc_ecma_parser/tests/tsc/spreadTypeVariable.json +++ b/crates/swc_ecma_parser/tests/tsc/spreadTypeVariable.json @@ -148,6 +148,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -305,6 +306,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -470,6 +472,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -654,6 +657,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -887,6 +891,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -1128,6 +1133,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/staticIndexSignature6.json b/crates/swc_ecma_parser/tests/tsc/staticIndexSignature6.json index 01e3f42e833e..160a9ca0409e 100644 --- a/crates/swc_ecma_parser/tests/tsc/staticIndexSignature6.json +++ b/crates/swc_ecma_parser/tests/tsc/staticIndexSignature6.json @@ -314,6 +314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/staticIndexers.json b/crates/swc_ecma_parser/tests/tsc/staticIndexers.json index aab6b8416bb9..6ebd2474a67a 100644 --- a/crates/swc_ecma_parser/tests/tsc/staticIndexers.json +++ b/crates/swc_ecma_parser/tests/tsc/staticIndexers.json @@ -288,6 +288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/staticMembersUsingClassTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/staticMembersUsingClassTypeParameter.json index a98725be5794..5f9b331ddaae 100644 --- a/crates/swc_ecma_parser/tests/tsc/staticMembersUsingClassTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/staticMembersUsingClassTypeParameter.json @@ -204,6 +204,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -410,6 +411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -432,6 +434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -638,6 +641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/staticPropertyNotInClassType.json b/crates/swc_ecma_parser/tests/tsc/staticPropertyNotInClassType.json index 619dec2e5a94..873a55154dc9 100644 --- a/crates/swc_ecma_parser/tests/tsc/staticPropertyNotInClassType.json +++ b/crates/swc_ecma_parser/tests/tsc/staticPropertyNotInClassType.json @@ -1277,6 +1277,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1299,6 +1300,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/strictBindCallApply1.json b/crates/swc_ecma_parser/tests/tsc/strictBindCallApply1.json index 1947979c10cd..7b95fdbca3bf 100644 --- a/crates/swc_ecma_parser/tests/tsc/strictBindCallApply1.json +++ b/crates/swc_ecma_parser/tests/tsc/strictBindCallApply1.json @@ -376,6 +376,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2668,6 +2669,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6410,6 +6412,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6855,6 +6858,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -7185,6 +7189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -7571,6 +7576,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/strictNullChecksNoWidening.json b/crates/swc_ecma_parser/tests/tsc/strictNullChecksNoWidening.json index fb0b8991caa0..380bd9a549a6 100644 --- a/crates/swc_ecma_parser/tests/tsc/strictNullChecksNoWidening.json +++ b/crates/swc_ecma_parser/tests/tsc/strictNullChecksNoWidening.json @@ -509,6 +509,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/strictTupleLength.json b/crates/swc_ecma_parser/tests/tsc/strictTupleLength.json index 0459058e0d95..a9cd23e852b0 100644 --- a/crates/swc_ecma_parser/tests/tsc/strictTupleLength.json +++ b/crates/swc_ecma_parser/tests/tsc/strictTupleLength.json @@ -726,6 +726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json index 5b84f11bd518..071e3d7ee1cc 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypeIsSubtypeOfString.json @@ -5029,6 +5029,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5133,6 +5134,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5235,6 +5237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5338,6 +5341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5460,6 +5464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5580,6 +5585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5958,6 +5964,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5980,6 +5987,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6102,6 +6110,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6124,6 +6133,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6244,6 +6254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6266,6 +6277,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6387,6 +6399,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6427,6 +6440,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6549,6 +6563,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6589,6 +6604,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6709,6 +6725,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6749,6 +6766,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint01.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint01.json index 1ff9526125fa..568abf38efc8 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint01.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint01.json @@ -186,6 +186,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsLiteralType", "span": { @@ -390,6 +391,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint02.json b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint02.json index d0eda5e8e801..549531d503ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint02.json +++ b/crates/swc_ecma_parser/tests/tsc/stringLiteralTypesAsTypeParameterConstraint02.json @@ -186,6 +186,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsLiteralType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json index 6cbc775c6c3f..ec7c37ca6f51 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfAny.json @@ -1553,6 +1553,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2061,6 +2062,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2866,6 +2868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3035,6 +3038,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3057,6 +3061,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json index c4756785d775..5e4dd8722d30 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameter.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -233,6 +234,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -255,6 +257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -581,6 +584,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -603,6 +607,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -859,6 +864,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2827,6 +2833,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3006,6 +3013,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4577,6 +4585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4828,6 +4837,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4850,6 +4860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5200,6 +5211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5222,6 +5234,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints.json index b8ac289588c0..5c48981418e1 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -299,6 +300,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -339,6 +341,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -555,6 +558,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -595,6 +599,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -811,6 +816,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -851,6 +857,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1067,6 +1074,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1107,6 +1115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1323,6 +1332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1363,6 +1373,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1403,6 +1414,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1619,6 +1631,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1659,6 +1672,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1699,6 +1713,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1915,6 +1930,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1955,6 +1971,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1995,6 +2012,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2211,6 +2229,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2251,6 +2270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2291,6 +2311,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2507,6 +2528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2547,6 +2569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2587,6 +2610,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2803,6 +2827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2843,6 +2868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2883,6 +2909,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3099,6 +3126,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3139,6 +3167,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3179,6 +3208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3395,6 +3425,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3435,6 +3466,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3475,6 +3507,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3691,6 +3724,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3731,6 +3765,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3771,6 +3806,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3987,6 +4023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4027,6 +4064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4067,6 +4105,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4301,6 +4340,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4341,6 +4381,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4381,6 +4422,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4615,6 +4657,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4655,6 +4698,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4695,6 +4739,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4929,6 +4974,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4969,6 +5015,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5009,6 +5056,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5243,6 +5291,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5283,6 +5332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5323,6 +5373,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5557,6 +5608,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5597,6 +5649,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5637,6 +5690,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5871,6 +5925,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5911,6 +5966,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5951,6 +6007,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6185,6 +6242,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6225,6 +6283,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6265,6 +6324,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6499,6 +6559,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6539,6 +6600,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6579,6 +6641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6813,6 +6876,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6853,6 +6917,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6893,6 +6958,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7127,6 +7193,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7167,6 +7234,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7207,6 +7275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7441,6 +7510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7481,6 +7551,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7521,6 +7592,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7755,6 +7827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7795,6 +7868,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7835,6 +7909,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8069,6 +8144,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8109,6 +8185,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8149,6 +8226,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8383,6 +8461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8423,6 +8502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8463,6 +8543,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8697,6 +8778,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8737,6 +8819,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8777,6 +8860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json index a07b2550a20e..9e6c99f7b391 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints2.json @@ -296,6 +296,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -336,6 +337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -955,6 +957,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -995,6 +998,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1035,6 +1039,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1648,6 +1653,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1688,6 +1694,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1962,6 +1969,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2714,6 +2722,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2983,6 +2992,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3252,6 +3262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3519,6 +3530,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3808,6 +3820,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4077,6 +4090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4392,6 +4406,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -4717,6 +4732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -4972,6 +4988,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5151,6 +5168,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5194,6 +5212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -5267,6 +5286,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5609,6 +5629,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5937,6 +5958,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6283,6 +6305,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6744,6 +6767,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7072,6 +7096,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeQuery", "span": { @@ -7400,6 +7425,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeQuery", "span": { @@ -7744,6 +7770,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8013,6 +8040,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8053,6 +8081,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8109,6 +8138,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8380,6 +8410,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8647,6 +8678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints3.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints3.json index 98d52ebff32d..449a556bc76e 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints3.json @@ -618,6 +618,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -658,6 +659,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -680,6 +682,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints4.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints4.json index 0420dbdbc7ae..a99c9338324b 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithConstraints4.json @@ -1164,6 +1164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1204,6 +1205,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1244,6 +1246,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1356,6 +1359,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1544,6 +1548,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1584,6 +1589,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1624,6 +1630,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1840,6 +1847,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1880,6 +1888,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1920,6 +1929,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2136,6 +2146,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2176,6 +2187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2216,6 +2228,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2432,6 +2445,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2472,6 +2486,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2512,6 +2527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2728,6 +2744,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2768,6 +2785,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2808,6 +2826,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3024,6 +3043,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3064,6 +3084,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3104,6 +3125,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3320,6 +3342,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3360,6 +3383,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3400,6 +3424,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3616,6 +3641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3656,6 +3682,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3696,6 +3723,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3912,6 +3940,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3952,6 +3981,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3992,6 +4022,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithRecursiveConstraints.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithRecursiveConstraints.json index b63207e67890..5d9bc5910fc8 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithRecursiveConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfTypeParameterWithRecursiveConstraints.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2657,6 +2658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2725,6 +2727,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2793,6 +2796,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2978,6 +2982,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3166,6 +3171,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3234,6 +3240,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3302,6 +3309,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3564,6 +3572,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3632,6 +3641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3700,6 +3710,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3962,6 +3973,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4030,6 +4042,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4098,6 +4111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4360,6 +4374,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4428,6 +4443,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4496,6 +4512,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4758,6 +4775,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4826,6 +4844,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4894,6 +4913,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5156,6 +5176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5224,6 +5245,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5292,6 +5314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5554,6 +5577,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5622,6 +5646,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5690,6 +5715,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5952,6 +5978,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6020,6 +6047,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6088,6 +6116,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6350,6 +6379,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6418,6 +6448,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6486,6 +6517,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6731,6 +6763,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6919,6 +6952,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6987,6 +7021,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7055,6 +7090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7317,6 +7353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7385,6 +7422,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7453,6 +7491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7715,6 +7754,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7783,6 +7823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7851,6 +7892,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8113,6 +8155,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8181,6 +8224,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8249,6 +8293,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8511,6 +8556,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8579,6 +8625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8647,6 +8694,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8909,6 +8957,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8977,6 +9026,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9045,6 +9095,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9307,6 +9358,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9375,6 +9427,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9443,6 +9496,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9705,6 +9759,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9773,6 +9828,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9841,6 +9897,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10103,6 +10160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10171,6 +10229,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10239,6 +10298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json b/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json index 5f6155a6b464..90e9aa695dc2 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypesOfUnion.json @@ -338,6 +338,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -657,6 +658,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1490,6 +1492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1819,6 +1822,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2662,6 +2666,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures.json index 8d78324fec70..2ceafbd145b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures.json @@ -487,6 +487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1010,6 +1011,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json index cef97625da75..0f96571357c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures2.json @@ -5082,6 +5082,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5204,6 +5205,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6401,6 +6403,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6836,6 +6839,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7258,6 +7262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7703,6 +7708,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7725,6 +7731,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8242,6 +8249,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8264,6 +8272,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8800,6 +8809,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8840,6 +8850,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9490,6 +9501,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9530,6 +9542,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10324,6 +10337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10364,6 +10378,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11324,6 +11339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11364,6 +11380,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12074,6 +12091,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12595,6 +12613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -13317,6 +13336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -13993,6 +14013,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -14715,6 +14736,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -15265,6 +15287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -15468,6 +15491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -15765,6 +15789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -16044,6 +16069,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json index 87056c63eb6d..138c7e4fafc0 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures3.json @@ -3334,6 +3334,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3458,6 +3459,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3646,6 +3648,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3770,6 +3773,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4115,6 +4119,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4137,6 +4142,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4375,6 +4381,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4397,6 +4404,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4567,6 +4575,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4589,6 +4598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4915,6 +4925,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4955,6 +4966,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4995,6 +5007,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5821,6 +5834,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5861,6 +5875,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6570,6 +6585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7116,6 +7132,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8077,6 +8094,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8567,6 +8585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9152,6 +9171,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9585,6 +9605,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9854,6 +9875,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10072,6 +10094,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10360,6 +10383,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10548,6 +10572,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10846,6 +10871,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json index 6e057e845e71..9cadf14996ee 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignatures4.json @@ -432,6 +432,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -679,6 +680,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -916,6 +918,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1182,6 +1185,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1204,6 +1208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1489,6 +1494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1511,6 +1517,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1806,6 +1813,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2235,6 +2243,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2567,6 +2576,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2907,6 +2917,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3271,6 +3282,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3459,6 +3471,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3758,6 +3771,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3882,6 +3896,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4070,6 +4085,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4194,6 +4210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4493,6 +4510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4650,6 +4668,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4989,6 +5008,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5126,6 +5146,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5477,6 +5498,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5600,6 +5622,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5963,6 +5986,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5985,6 +6009,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6146,6 +6171,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6168,6 +6194,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6575,6 +6602,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6597,6 +6625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6802,6 +6831,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6824,6 +6854,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7231,6 +7262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7271,6 +7303,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7494,6 +7527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8035,6 +8069,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8057,6 +8092,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8378,6 +8414,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8830,6 +8867,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8852,6 +8890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9102,6 +9141,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9554,6 +9594,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9822,6 +9863,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10255,6 +10297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10457,6 +10500,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json index e70761bb7283..35ae981a4784 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithCallSignaturesWithSpecializedSignatures.json @@ -494,6 +494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -961,6 +962,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1506,6 +1508,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1886,6 +1889,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2206,6 +2210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2533,6 +2538,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures.json index b47dd0f74d52..6f2d1cdca6e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures.json @@ -516,6 +516,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1150,6 +1151,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json index 97e3af52346c..849fecc0ca88 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures2.json @@ -5106,6 +5106,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5228,6 +5229,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6405,6 +6407,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6866,6 +6869,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7317,6 +7321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7799,6 +7804,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7821,6 +7827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8350,6 +8357,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8372,6 +8380,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8921,6 +8930,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8961,6 +8971,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9558,6 +9569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9598,6 +9610,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10403,6 +10416,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10443,6 +10457,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11414,6 +11429,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11454,6 +11470,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12224,6 +12241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12766,6 +12784,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -13456,6 +13475,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -14181,6 +14201,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -14906,6 +14927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -15444,6 +15466,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -15665,6 +15688,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -15950,6 +15974,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -16227,6 +16252,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json index 99ea8a6d0327..3ee2b3aae1e8 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures3.json @@ -3346,6 +3346,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3470,6 +3471,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3658,6 +3660,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3782,6 +3785,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4067,6 +4071,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4089,6 +4094,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4607,6 +4613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4647,6 +4654,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4687,6 +4695,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5523,6 +5532,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5563,6 +5573,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6332,6 +6343,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6874,6 +6886,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7829,6 +7842,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8317,6 +8331,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8938,6 +8953,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9352,6 +9368,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9630,6 +9647,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9876,6 +9894,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10145,6 +10164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10361,6 +10381,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10620,6 +10641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json index 3ca207e9331b..763e60a146e8 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures4.json @@ -432,6 +432,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -680,6 +681,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -918,6 +920,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1185,6 +1188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1207,6 +1211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1494,6 +1499,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1516,6 +1522,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1813,6 +1820,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2243,6 +2251,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2576,6 +2585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2917,6 +2927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3283,6 +3294,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3472,6 +3484,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3771,6 +3784,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3895,6 +3909,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4083,6 +4098,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4207,6 +4223,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4466,6 +4483,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4621,6 +4639,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4978,6 +4997,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5123,6 +5143,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5470,6 +5491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5617,6 +5639,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5993,6 +6016,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6015,6 +6039,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6189,6 +6214,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6211,6 +6237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6607,6 +6634,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6629,6 +6657,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6833,6 +6862,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6855,6 +6885,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7261,6 +7292,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7301,6 +7333,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -7523,6 +7556,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8062,6 +8096,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8084,6 +8119,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8403,6 +8439,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8845,6 +8882,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8867,6 +8905,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9115,6 +9154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9565,6 +9605,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -9831,6 +9872,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10263,6 +10305,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10508,6 +10551,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json index bf1d148fad7c..c81525c264fe 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures5.json @@ -3060,6 +3060,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3258,6 +3259,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3405,6 +3407,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3542,6 +3545,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3718,6 +3722,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3740,6 +3745,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3935,6 +3941,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3957,6 +3964,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4152,6 +4160,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4192,6 +4201,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4405,6 +4415,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4445,6 +4456,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4807,6 +4819,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4847,6 +4860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5282,6 +5296,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5322,6 +5337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5557,6 +5573,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5751,6 +5768,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5973,6 +5991,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6251,6 +6270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -6529,6 +6549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6551,6 +6572,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json index fdd06706790f..fc912c21b26f 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignatures6.json @@ -451,6 +451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -598,6 +599,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -735,6 +737,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -901,6 +904,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -923,6 +927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1108,6 +1113,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1130,6 +1136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1325,6 +1332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1654,6 +1662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1886,6 +1895,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2126,6 +2136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2237,6 +2248,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2435,6 +2447,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2623,6 +2636,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2813,6 +2827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2986,6 +3001,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3061,6 +3077,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3253,6 +3270,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3338,6 +3356,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3646,6 +3665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3731,6 +3751,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json index 8407fa4fca0a..1d15f83e70e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithConstructSignaturesWithSpecializedSignatures.json @@ -494,6 +494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -961,6 +962,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1506,6 +1508,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1889,6 +1892,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2210,6 +2214,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2539,6 +2544,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json index 558a9b82ded8..4fac07fe7e16 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericCallSignaturesWithOptionalParameters.json @@ -78,6 +78,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -711,6 +712,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -890,6 +892,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1107,6 +1110,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1324,6 +1328,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1503,6 +1508,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1720,6 +1726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1937,6 +1944,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2116,6 +2124,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2333,6 +2342,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2550,6 +2560,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2804,6 +2815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2983,6 +2995,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3237,6 +3250,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3454,6 +3468,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3708,6 +3723,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3887,6 +3903,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4141,6 +4158,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4358,6 +4376,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4689,6 +4708,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4827,6 +4847,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4965,6 +4986,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5140,6 +5162,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5315,6 +5338,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5399,6 +5423,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5550,6 +5575,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5739,6 +5765,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5928,6 +5955,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6079,6 +6107,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6268,6 +6297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6457,6 +6487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6608,6 +6639,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6797,6 +6829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6986,6 +7019,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7212,6 +7246,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7363,6 +7398,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7589,6 +7625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7778,6 +7815,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8004,6 +8042,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8155,6 +8194,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8381,6 +8421,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8570,6 +8611,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8873,6 +8915,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9011,6 +9054,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9149,6 +9193,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9324,6 +9369,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9499,6 +9545,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9650,6 +9697,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9839,6 +9887,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10028,6 +10077,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10179,6 +10229,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10368,6 +10419,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10557,6 +10609,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10708,6 +10761,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10897,6 +10951,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11086,6 +11141,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11312,6 +11368,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11463,6 +11520,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11689,6 +11747,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11878,6 +11937,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12104,6 +12164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12255,6 +12316,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12481,6 +12543,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12670,6 +12733,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12896,6 +12960,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json index 68235c509f50..51dc49cd08a5 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithGenericConstructSignaturesWithOptionalParameters.json @@ -78,6 +78,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -716,6 +717,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -896,6 +898,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1114,6 +1117,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1332,6 +1336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1512,6 +1517,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1730,6 +1736,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1948,6 +1955,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2128,6 +2136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2346,6 +2355,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2564,6 +2574,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2819,6 +2830,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2999,6 +3011,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3254,6 +3267,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3472,6 +3486,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3727,6 +3742,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3907,6 +3923,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4162,6 +4179,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4380,6 +4398,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4712,6 +4731,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4851,6 +4871,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4990,6 +5011,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5166,6 +5188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5342,6 +5365,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5427,6 +5451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5579,6 +5604,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5769,6 +5795,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5959,6 +5986,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6111,6 +6139,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6301,6 +6330,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6491,6 +6521,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6643,6 +6674,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6833,6 +6865,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7023,6 +7056,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7250,6 +7284,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7402,6 +7437,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7629,6 +7665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7819,6 +7856,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8046,6 +8084,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8198,6 +8237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8425,6 +8465,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8615,6 +8656,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8919,6 +8961,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9058,6 +9101,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9197,6 +9241,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9373,6 +9418,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9549,6 +9595,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9701,6 +9748,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -9891,6 +9939,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10081,6 +10130,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10233,6 +10283,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10423,6 +10474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10613,6 +10665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10765,6 +10818,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -10955,6 +11009,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11145,6 +11200,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11372,6 +11428,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11524,6 +11581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11751,6 +11809,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11941,6 +12000,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12168,6 +12228,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12320,6 +12381,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12547,6 +12609,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12737,6 +12800,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12964,6 +13028,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer.json index f2a047c24f82..744fd4e6a2ff 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer.json @@ -702,6 +702,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1113,6 +1114,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1292,6 +1294,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer2.json index b624938784ab..2010ed7ea9d5 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer2.json @@ -665,6 +665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1101,6 +1102,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1295,6 +1297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1489,6 +1492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer3.json index 0068596630f3..1b1947a4d3f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer3.json @@ -702,6 +702,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1113,6 +1114,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1292,6 +1294,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1471,6 +1474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer4.json index 37fafe51f062..a369b1b904f7 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer4.json @@ -590,6 +590,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -851,6 +852,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer5.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer5.json index ff7529c34551..ba76af11235b 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer5.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithNumericIndexer5.json @@ -657,6 +657,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1156,6 +1157,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1346,6 +1348,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1536,6 +1539,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json index 6228f4912f60..7fb2187484f5 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithOptionalProperties.json @@ -230,6 +230,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer.json index bc3846233573..b2f2a90fcac8 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer.json @@ -702,6 +702,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1113,6 +1114,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1292,6 +1294,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer2.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer2.json index 011a7ce85a3b..bf3e03f35433 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer2.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer2.json @@ -665,6 +665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1101,6 +1102,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1295,6 +1297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1489,6 +1492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer3.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer3.json index 3b4c2e94e597..7931a347b8ef 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer3.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer3.json @@ -702,6 +702,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1113,6 +1114,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1292,6 +1294,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1471,6 +1474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer4.json b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer4.json index 00a486fb7959..534e1207bb05 100644 --- a/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer4.json +++ b/crates/swc_ecma_parser/tests/tsc/subtypingWithStringIndexer4.json @@ -590,6 +590,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -851,6 +852,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/superCallInConstructorWithNoBaseType.json b/crates/swc_ecma_parser/tests/tsc/superCallInConstructorWithNoBaseType.json index 96d01e8c80c4..3b41824429e3 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallInConstructorWithNoBaseType.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallInConstructorWithNoBaseType.json @@ -247,6 +247,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping1.json index 04f780e64df9..4328b02912e8 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping1.json @@ -192,6 +192,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -214,6 +215,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping2.json b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping2.json index 0c09fba25eaa..5b5251aa6487 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping2.json @@ -192,6 +192,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -214,6 +215,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json index 6e07d781305c..d4031d25d280 100644 --- a/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json +++ b/crates/swc_ecma_parser/tests/tsc/superCallParameterContextualTyping3.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -422,6 +423,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/switchStatements.json b/crates/swc_ecma_parser/tests/tsc/switchStatements.json index 3fb15c65cc0c..4cf42f726316 100644 --- a/crates/swc_ecma_parser/tests/tsc/switchStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/switchStatements.json @@ -693,6 +693,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -798,6 +799,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1518,6 +1520,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1633,6 +1636,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/switchWithConstrainedTypeVariable.json b/crates/swc_ecma_parser/tests/tsc/switchWithConstrainedTypeVariable.json index b9e132196b71..124ac21d1f0e 100644 --- a/crates/swc_ecma_parser/tests/tsc/switchWithConstrainedTypeVariable.json +++ b/crates/swc_ecma_parser/tests/tsc/switchWithConstrainedTypeVariable.json @@ -273,6 +273,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json index 47ca51c24bab..ba9bbac37f5b 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty21.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -372,6 +374,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -394,6 +397,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json index a2e3be0f40e6..bddbda222de1 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty22.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -386,6 +388,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -408,6 +411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json b/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json index be0fb622f455..f39d39a564a0 100644 --- a/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json +++ b/crates/swc_ecma_parser/tests/tsc/symbolProperty61.json @@ -613,6 +613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -667,6 +668,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1091,6 +1093,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/syntaxErrors.json b/crates/swc_ecma_parser/tests/tsc/syntaxErrors.json index d9b9252f1f63..f71570a65c7b 100644 --- a/crates/swc_ecma_parser/tests/tsc/syntaxErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/syntaxErrors.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping1.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping1.json index a7d8e9cc363f..0a61f6cc3972 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping1.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping1.json @@ -122,6 +122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -377,6 +378,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -645,6 +647,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -814,6 +817,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1604,6 +1608,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1923,6 +1928,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping2.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping2.json index 638e92099f41..054f14805122 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping2.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateContextualTyping2.json @@ -122,6 +122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -304,6 +305,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -326,6 +328,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json index 9c3c5e322421..8faf45a8b93c 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInference.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -272,6 +273,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -469,6 +471,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -491,6 +494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -720,6 +724,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -742,6 +747,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1017,6 +1023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1370,6 +1377,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1392,6 +1400,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1707,6 +1716,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2209,6 +2219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2231,6 +2242,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2777,6 +2789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2799,6 +2812,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3513,6 +3527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4543,6 +4558,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4565,6 +4581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4587,6 +4604,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5376,6 +5394,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5871,6 +5890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json index eafcde21ae68..63489f26f6fb 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsTypeArgumentInferenceES6.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -272,6 +273,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -469,6 +471,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -491,6 +494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -720,6 +724,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -742,6 +747,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1017,6 +1023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1370,6 +1377,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1392,6 +1400,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1707,6 +1716,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2209,6 +2219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2231,6 +2242,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2777,6 +2789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2799,6 +2812,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3513,6 +3527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4543,6 +4558,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4565,6 +4581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4587,6 +4604,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5376,6 +5394,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5871,6 +5890,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3.json index 634f30bfc1b7..4dc49303cf06 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3.json @@ -828,6 +828,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1573,6 +1574,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1821,6 +1823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1843,6 +1846,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2111,6 +2115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2133,6 +2138,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2155,6 +2161,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3254,6 +3261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3284,6 +3292,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3488,6 +3497,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3518,6 +3528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3_ES6.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3_ES6.json index 3be23a37ba66..69ee8989d2f4 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3_ES6.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplateStringsWithOverloadResolution3_ES6.json @@ -828,6 +828,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1573,6 +1574,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1821,6 +1823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1843,6 +1846,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2111,6 +2115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2133,6 +2138,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2155,6 +2161,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3254,6 +3261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3284,6 +3292,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3488,6 +3497,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3518,6 +3528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json index 480b2cf1802c..d4a7ea79c95e 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments1.json @@ -237,6 +237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1119,6 +1120,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1141,6 +1143,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1163,6 +1166,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1185,6 +1189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1831,6 +1836,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments2.json b/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments2.json index 5a00a4e091cf..b419cd5b2fcb 100644 --- a/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments2.json +++ b/crates/swc_ecma_parser/tests/tsc/taggedTemplatesWithTypeArguments2.json @@ -200,6 +200,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -357,6 +358,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1462,6 +1464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1484,6 +1487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1506,6 +1510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1700,6 +1705,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json index 926bf0376b8c..1a3245840c5f 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes2.json @@ -1180,6 +1180,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3857,6 +3858,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3987,6 +3989,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -5273,6 +5276,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5403,6 +5407,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5813,6 +5818,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5900,6 +5906,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json index 38daf8d78e00..e7df82d5c063 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypes3.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -123,6 +124,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1408,6 +1410,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2401,6 +2404,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2461,6 +2465,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2586,6 +2591,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2616,6 +2622,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4989,6 +4996,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5743,6 +5751,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5803,6 +5812,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5875,6 +5885,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5905,6 +5916,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6228,6 +6240,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6300,6 +6313,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6603,6 +6617,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6675,6 +6690,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6705,6 +6721,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7028,6 +7045,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7100,6 +7118,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7946,6 +7965,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8076,6 +8096,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8116,6 +8137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -8591,6 +8613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9503,6 +9526,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -10737,6 +10761,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -10907,6 +10932,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12257,6 +12283,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json index 804afd328867..94d5960f921d 100644 --- a/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json +++ b/crates/swc_ecma_parser/tests/tsc/templateLiteralTypesPatterns.json @@ -258,6 +258,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -288,6 +289,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1092,6 +1094,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -5392,6 +5395,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -7173,6 +7177,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -7203,6 +7208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -7864,6 +7870,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -7886,6 +7893,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisInInstanceMemberInitializer.json b/crates/swc_ecma_parser/tests/tsc/thisInInstanceMemberInitializer.json index 50d6cf57153c..b99799256c08 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisInInstanceMemberInitializer.json +++ b/crates/swc_ecma_parser/tests/tsc/thisInInstanceMemberInitializer.json @@ -210,6 +210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisInInvalidContexts.json b/crates/swc_ecma_parser/tests/tsc/thisInInvalidContexts.json index 7a38c40a2feb..b14e0e9c68e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisInInvalidContexts.json +++ b/crates/swc_ecma_parser/tests/tsc/thisInInvalidContexts.json @@ -552,6 +552,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisInInvalidContextsExternalModule.json b/crates/swc_ecma_parser/tests/tsc/thisInInvalidContextsExternalModule.json index d48bc8095893..ff7f2c26d5f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisInInvalidContextsExternalModule.json +++ b/crates/swc_ecma_parser/tests/tsc/thisInInvalidContextsExternalModule.json @@ -552,6 +552,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json b/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json index c75b9b126bc9..b7b5ea16ba51 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeAccessibility.json @@ -942,6 +942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1962,6 +1963,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2455,6 +2457,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3057,6 +3060,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeAndConstraints.json b/crates/swc_ecma_parser/tests/tsc/thisTypeAndConstraints.json index ade3112fce65..1c90a1858d79 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeAndConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeAndConstraints.json @@ -343,6 +343,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -465,6 +466,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -847,6 +849,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -909,6 +912,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeErrors2.json b/crates/swc_ecma_parser/tests/tsc/thisTypeErrors2.json index 1062b98dfeb7..22f918ca4b68 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeErrors2.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeErrors2.json @@ -148,6 +148,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInBasePropertyAndDerivedContainerOfBase01.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInBasePropertyAndDerivedContainerOfBase01.json index d1a5934be443..ab20726a346e 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInBasePropertyAndDerivedContainerOfBase01.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInBasePropertyAndDerivedContainerOfBase01.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json index 59443076e953..49598db9150a 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInClasses.json @@ -320,6 +320,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json index b10f4b85aa38..9dcc22b4d5c2 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions.json @@ -11811,6 +11811,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions3.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions3.json index 81be1642bb2a..ee853a83891e 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions3.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInFunctions3.json @@ -128,6 +128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsThisType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json index 2934241538a7..796ab48886fa 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInInterfaces.json @@ -380,6 +380,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json index 9146fd7ea68c..4b00869f9ca1 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInObjectLiterals2.json @@ -3613,6 +3613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3635,6 +3636,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3983,6 +3985,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4005,6 +4008,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4483,6 +4487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4505,6 +4510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4853,6 +4859,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4875,6 +4882,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5353,6 +5361,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5593,6 +5602,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5625,6 +5635,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -6008,6 +6019,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6030,6 +6042,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6060,6 +6073,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6397,6 +6411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6419,6 +6434,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7649,6 +7665,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7681,6 +7698,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7918,6 +7936,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8045,6 +8064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8234,6 +8254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8256,6 +8277,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8278,6 +8300,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8807,6 +8830,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8829,6 +8853,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -8851,6 +8876,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInTaggedTemplateCall.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInTaggedTemplateCall.json index 7872c58447eb..b23381798581 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInTaggedTemplateCall.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInTaggedTemplateCall.json @@ -247,6 +247,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInTuples.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInTuples.json index 6a0d3fea5ef3..b58fbc9aec3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInTuples.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInTuples.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeInTypePredicate.json b/crates/swc_ecma_parser/tests/tsc/thisTypeInTypePredicate.json index 075a2dad8681..0abca052a110 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeInTypePredicate.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeInTypePredicate.json @@ -203,6 +203,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/thisTypeOptionalCall.json b/crates/swc_ecma_parser/tests/tsc/thisTypeOptionalCall.json index af6450a2ae64..b95aebcfe0d1 100644 --- a/crates/swc_ecma_parser/tests/tsc/thisTypeOptionalCall.json +++ b/crates/swc_ecma_parser/tests/tsc/thisTypeOptionalCall.json @@ -365,6 +365,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -387,6 +388,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -425,6 +427,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/throwInEnclosingStatements.json b/crates/swc_ecma_parser/tests/tsc/throwInEnclosingStatements.json index 19f530e87081..16c90e9a5d29 100644 --- a/crates/swc_ecma_parser/tests/tsc/throwInEnclosingStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/throwInEnclosingStatements.json @@ -190,6 +190,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -982,6 +983,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/throwStatements.json b/crates/swc_ecma_parser/tests/tsc/throwStatements.json index daa8b3a792e9..17dac1f4b338 100644 --- a/crates/swc_ecma_parser/tests/tsc/throwStatements.json +++ b/crates/swc_ecma_parser/tests/tsc/throwStatements.json @@ -469,6 +469,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2318,6 +2319,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName.json b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName.json index 715162e50e9c..84a0f2778c3e 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName.json +++ b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -164,6 +165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -277,6 +279,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -299,6 +302,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -412,6 +416,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -434,6 +439,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -574,6 +580,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -687,6 +694,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -800,6 +808,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -822,6 +831,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -935,6 +945,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -957,6 +968,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1100,6 +1112,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1122,6 +1135,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1265,6 +1279,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1287,6 +1302,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1437,6 +1453,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1459,6 +1476,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1610,6 +1628,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1632,6 +1651,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName2.json b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName2.json index 6229c4732133..c9d25f01b24e 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName2.json +++ b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesDifferingByTypeParameterName2.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -186,6 +188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -208,6 +211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -348,6 +352,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -370,6 +375,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -483,6 +489,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -505,6 +512,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -648,6 +656,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -670,6 +679,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -813,6 +823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -835,6 +846,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -985,6 +997,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1007,6 +1020,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1158,6 +1172,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1180,6 +1195,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithDifferentConstraints.json b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithDifferentConstraints.json index c007aba86778..614c28f4e4ad 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithDifferentConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithDifferentConstraints.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -182,6 +183,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -340,6 +342,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -499,6 +502,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -678,6 +682,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -839,6 +844,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1007,6 +1013,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1176,6 +1183,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1311,6 +1319,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1511,6 +1520,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1703,6 +1713,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1816,6 +1827,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1937,6 +1949,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithTheSameNameButDifferentArity.json b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithTheSameNameButDifferentArity.json index 2a639beecd35..dd4e07916ca5 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithTheSameNameButDifferentArity.json +++ b/crates/swc_ecma_parser/tests/tsc/twoGenericInterfacesWithTheSameNameButDifferentArity.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -164,6 +165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -186,6 +188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -326,6 +329,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -439,6 +443,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -461,6 +466,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -604,6 +610,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -747,6 +754,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -769,6 +777,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -919,6 +928,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1070,6 +1080,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1092,6 +1103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule.json b/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule.json index 228aab3652db..01d84d5403f2 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule.json +++ b/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule.json @@ -165,6 +165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -575,6 +576,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule2.json b/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule2.json index 9caafbb8299e..93d9ce803a23 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule2.json +++ b/crates/swc_ecma_parser/tests/tsc/twoInterfacesDifferentRootModule2.json @@ -165,6 +165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -572,6 +573,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json index 1c70ea9f5974..202b063cde03 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json +++ b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads.json @@ -337,6 +337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -545,6 +546,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -933,6 +935,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -955,6 +958,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1227,6 +1231,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1249,6 +1254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1413,6 +1419,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1660,6 +1667,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1682,6 +1690,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1948,6 +1957,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2002,6 +2012,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2024,6 +2035,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2188,6 +2200,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.json b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.json index 13926a515f9e..355473cbbe6d 100644 --- a/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.json +++ b/crates/swc_ecma_parser/tests/tsc/twoMergedInterfacesWithDifferingOverloads2.json @@ -560,6 +560,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -724,6 +725,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -977,6 +979,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeAliases.json b/crates/swc_ecma_parser/tests/tsc/typeAliases.json index 8d6e255a5422..9fe0e13c980a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeAliases.json +++ b/crates/swc_ecma_parser/tests/tsc/typeAliases.json @@ -2291,6 +2291,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2331,6 +2332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeAliasesForObjectTypes.json b/crates/swc_ecma_parser/tests/tsc/typeAliasesForObjectTypes.json index 881b11807cda..ced1dbcccbe5 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeAliasesForObjectTypes.json +++ b/crates/swc_ecma_parser/tests/tsc/typeAliasesForObjectTypes.json @@ -448,6 +448,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json index 24df6326809b..e4b1182b0c90 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInference.json @@ -64,6 +64,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -286,6 +287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -596,6 +598,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -618,6 +621,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -913,6 +917,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1419,6 +1424,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1441,6 +1447,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1984,6 +1991,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2399,6 +2407,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2421,6 +2430,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2864,6 +2874,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2886,6 +2897,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3497,6 +3509,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4382,6 +4395,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4404,6 +4418,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4426,6 +4441,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5106,6 +5122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5517,6 +5534,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json index 38c3248bac18..ba1f89d2fa49 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceConstructSignatures.json @@ -70,6 +70,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -350,6 +351,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -709,6 +711,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -731,6 +734,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1166,6 +1170,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1730,6 +1735,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1752,6 +1758,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2353,6 +2360,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2817,6 +2825,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2839,6 +2848,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3454,6 +3464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3476,6 +3487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4250,6 +4262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5384,6 +5397,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5406,6 +5420,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5428,6 +5443,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6173,6 +6189,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -6607,6 +6624,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceErrors.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceErrors.json index 473ebe3f8092..f35739ac6316 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceErrors.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceErrors.json @@ -147,6 +147,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -169,6 +170,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -455,6 +457,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -477,6 +480,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -804,6 +808,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -826,6 +831,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1321,6 +1327,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceTransitiveConstraints.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceTransitiveConstraints.json index 5249e8519d77..38c16736cc25 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceTransitiveConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceTransitiveConstraints.json @@ -261,6 +261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -301,6 +302,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -341,6 +343,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression1.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression1.json index 4dd726d71c68..32024cb51e3f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression1.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression1.json @@ -185,6 +185,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression2.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression2.json index e3401219b2ba..4148df5851ce 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression2.json @@ -185,6 +185,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression3.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression3.json index b734c9249aad..e65f8705dec4 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithClassExpression3.json @@ -185,6 +185,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json index e82c49771f9a..ffa129553a52 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithConstraints.json @@ -64,6 +64,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -294,6 +295,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -612,6 +614,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -634,6 +637,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1111,6 +1115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1625,6 +1630,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1655,6 +1661,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2206,6 +2213,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2639,6 +2647,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2661,6 +2670,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3235,6 +3245,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -3265,6 +3276,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3999,6 +4011,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5101,6 +5114,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5123,6 +5137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -5153,6 +5168,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5833,6 +5849,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6270,6 +6287,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json index 9964374abe27..44d74cb830cf 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentInferenceWithObjectLiteral.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -313,6 +314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1053,6 +1055,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1075,6 +1078,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeArgumentsWithStringLiteralTypes01.json b/crates/swc_ecma_parser/tests/tsc/typeArgumentsWithStringLiteralTypes01.json index 2dae7fb423bd..65cd41f2054c 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeArgumentsWithStringLiteralTypes01.json +++ b/crates/swc_ecma_parser/tests/tsc/typeArgumentsWithStringLiteralTypes01.json @@ -585,6 +585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -800,6 +801,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -822,6 +824,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1020,6 +1023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionGenerics.json b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionGenerics.json index a2ca0449d230..7b6f47b80193 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionGenerics.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionGenerics.json @@ -631,6 +631,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -827,6 +828,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1041,6 +1043,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1264,6 +1267,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1524,6 +1528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1546,6 +1551,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThis.json b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThis.json index d2269ba37e44..ad8e37c3f15b 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThis.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardFunctionOfFormThis.json @@ -2259,6 +2259,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormThisMember.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormThisMember.json index e66ebf9b85a6..6f365070c20f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormThisMember.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormThisMember.json @@ -1792,6 +1792,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1942,6 +1943,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2092,6 +2094,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json index cadbff8d85b1..7e5d70b75d1d 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardOfFormTypeOfFunction.json @@ -628,6 +628,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2143,6 +2144,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2165,6 +2167,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2592,6 +2595,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json index 9ce1198bf069..085f006af111 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsAsAssertions.json @@ -107,6 +107,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -322,6 +323,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -668,6 +670,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -891,6 +894,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1349,6 +1353,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsTypeParameters.json index bfd9660b8c91..fd21d377c84e 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsTypeParameters.json @@ -404,6 +404,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -736,6 +737,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -808,6 +810,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1248,6 +1251,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json index 65f0d92785c5..70fa01f4a58c 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json +++ b/crates/swc_ecma_parser/tests/tsc/typeGuardsWithInstanceOfByConstructorSignature.json @@ -690,6 +690,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -744,6 +745,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeInferenceWithTupleType.json b/crates/swc_ecma_parser/tests/tsc/typeInferenceWithTupleType.json index bae6493be4cd..2501ad042e2a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeInferenceWithTupleType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeInferenceWithTupleType.json @@ -202,6 +202,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -224,6 +225,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1278,6 +1280,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1300,6 +1303,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1852,6 +1856,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1874,6 +1879,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2076,6 +2082,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2098,6 +2105,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json index 7fcb9c0ca98a..b48aaccd844a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisGeneral.json @@ -4296,6 +4296,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4318,6 +4319,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInAccessor.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInAccessor.json index 50a83301f6d6..69c8579f5699 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInAccessor.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInAccessor.json @@ -558,6 +558,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember2.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember2.json index 60dbf96bd3f8..e465e94d0770 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInInstanceMember2.json @@ -569,6 +569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInMemberFunctions.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInMemberFunctions.json index 3f24af03f993..316d4b89df63 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInMemberFunctions.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInMemberFunctions.json @@ -486,6 +486,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -773,6 +774,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers.json index 8d88a8da4de3..ba6c6844eaca 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers.json @@ -843,6 +843,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers2.json b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers2.json index 50c9f7c75d7e..bff516491892 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeOfThisInStaticMembers2.json @@ -155,6 +155,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsBaseType.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsBaseType.json index 2deef86a5e42..c1e66e78ef5e 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsBaseType.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsBaseType.json @@ -64,6 +64,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -130,6 +131,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -152,6 +154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -205,6 +208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -286,6 +290,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -308,6 +313,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json index c3a50c1a7224..a55e223a8db2 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeArgument.json @@ -335,6 +335,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -357,6 +358,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -469,6 +471,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -491,6 +494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -544,6 +548,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -566,6 +571,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json index 69d5fd21a427..336e980abe34 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint.json @@ -176,6 +176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -198,6 +199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1085,6 +1087,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1107,6 +1110,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json index 08c718788f3e..4badaea77f78 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraint2.json @@ -176,6 +176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -198,6 +199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -758,6 +760,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -780,6 +783,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json index 324dfef1a688..ecd6109536ab 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively.json @@ -655,6 +655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -677,6 +678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -699,6 +701,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1580,6 +1583,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1620,6 +1624,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1642,6 +1647,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json index b36974b7c45e..ef1a72b45291 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAsTypeParameterConstraintTransitively2.json @@ -655,6 +655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -677,6 +678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -699,6 +701,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1623,6 +1626,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1663,6 +1667,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1703,6 +1708,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability.json index 62ec7c339cd6..44688f20a0e4 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability.json @@ -234,6 +234,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -256,6 +257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability2.json index 3c5a49838321..d30055428695 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability2.json @@ -234,6 +234,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -256,6 +257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -509,6 +511,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -549,6 +552,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -982,6 +986,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1022,6 +1027,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1062,6 +1068,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1812,6 +1819,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1852,6 +1860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1892,6 +1901,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2660,6 +2670,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2700,6 +2711,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2740,6 +2752,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3191,6 +3204,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3231,6 +3245,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3253,6 +3268,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability3.json b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability3.json index 710bc00bcbf6..4680a4948f92 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterAssignability3.json @@ -576,6 +576,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -616,6 +617,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -990,6 +992,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1030,6 +1033,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiers.json b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiers.json new file mode 100644 index 000000000000..031130d1777d --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiers.json @@ -0,0 +1,5609 @@ +{ + "type": "Script", + "span": { + "start": 19, + "end": 1796, + "ctxt": 0 + }, + "body": [ + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 36, + "end": 38, + "ctxt": 0 + }, + "value": "f1", + "optional": false + }, + "declare": true, + "params": [ + { + "type": "Parameter", + "span": { + "start": 48, + "end": 52, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 48, + "end": 52, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 49, + "end": 52, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 51, + "end": 52, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 51, + "end": 52, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + ], + "decorators": [], + "span": { + "start": 19, + "end": 57, + "ctxt": 0 + }, + "body": null, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 38, + "end": 47, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 39, + "end": 46, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 45, + "end": 46, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 53, + "end": 56, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 55, + "end": 56, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 55, + "end": 56, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 59, + "end": 79, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 65, + "end": 78, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 65, + "end": 68, + "ctxt": 0 + }, + "value": "x11", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 71, + "end": 78, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 71, + "end": 73, + "ctxt": 0 + }, + "value": "f1", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 74, + "end": 77, + "ctxt": 0 + }, + "value": "a", + "raw": "'a'" + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 80, + "end": 114, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 86, + "end": 113, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 86, + "end": 89, + "ctxt": 0 + }, + "value": "x12", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 92, + "end": 113, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 92, + "end": 94, + "ctxt": 0 + }, + "value": "f1", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 95, + "end": 112, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 96, + "end": 99, + "ctxt": 0 + }, + "value": "a", + "raw": "'a'" + } + }, + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 101, + "end": 111, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 102, + "end": 105, + "ctxt": 0 + }, + "value": "b", + "raw": "'b'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 107, + "end": 110, + "ctxt": 0 + }, + "value": "c", + "raw": "'c'" + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 115, + "end": 179, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 121, + "end": 178, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 121, + "end": 124, + "ctxt": 0 + }, + "value": "x13", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 127, + "end": 178, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 127, + "end": 129, + "ctxt": 0 + }, + "value": "f1", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 130, + "end": 177, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 132, + "end": 133, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 135, + "end": 136, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 138, + "end": 139, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 141, + "end": 144, + "ctxt": 0 + }, + "value": "c", + "raw": "\"c\"" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 146, + "end": 147, + "ctxt": 0 + }, + "value": "d", + "optional": false + }, + "value": { + "type": "ArrayExpression", + "span": { + "start": 149, + "end": 175, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 150, + "end": 153, + "ctxt": 0 + }, + "value": "e", + "raw": "\"e\"" + } + }, + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 155, + "end": 156, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "spread": null, + "expression": { + "type": "BooleanLiteral", + "span": { + "start": 158, + "end": 162, + "ctxt": 0 + }, + "value": true + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 164, + "end": 174, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 166, + "end": 167, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 169, + "end": 172, + "ctxt": 0 + }, + "value": "g", + "raw": "\"g\"" + } + } + ] + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 198, + "end": 200, + "ctxt": 0 + }, + "value": "f2", + "optional": false + }, + "declare": true, + "params": [ + { + "type": "Parameter", + "span": { + "start": 213, + "end": 229, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 213, + "end": 229, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 214, + "end": 229, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsUnionType", + "span": { + "start": 216, + "end": 229, + "ctxt": 0 + }, + "types": [ + { + "type": "TsTypeReference", + "span": { + "start": 216, + "end": 217, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 216, + "end": 217, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + }, + { + "type": "TsKeywordType", + "span": { + "start": 220, + "end": 229, + "ctxt": 0 + }, + "kind": "undefined" + } + ] + } + } + } + } + ], + "decorators": [], + "span": { + "start": 181, + "end": 234, + "ctxt": 0 + }, + "body": null, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 200, + "end": 212, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 201, + "end": 208, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 207, + "end": 208, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + }, + { + "type": "TsTypeParameter", + "span": { + "start": 210, + "end": 211, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 210, + "end": 211, + "ctxt": 0 + }, + "value": "U", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 230, + "end": 233, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 232, + "end": 233, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 232, + "end": 233, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 236, + "end": 256, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 242, + "end": 255, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 242, + "end": 245, + "ctxt": 0 + }, + "value": "x21", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 248, + "end": 255, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 248, + "end": 250, + "ctxt": 0 + }, + "value": "f2", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 251, + "end": 254, + "ctxt": 0 + }, + "value": "a", + "raw": "'a'" + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 257, + "end": 291, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 263, + "end": 290, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 263, + "end": 266, + "ctxt": 0 + }, + "value": "x22", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 269, + "end": 290, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 269, + "end": 271, + "ctxt": 0 + }, + "value": "f2", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 272, + "end": 289, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 273, + "end": 276, + "ctxt": 0 + }, + "value": "a", + "raw": "'a'" + } + }, + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 278, + "end": 288, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 279, + "end": 282, + "ctxt": 0 + }, + "value": "b", + "raw": "'b'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 284, + "end": 287, + "ctxt": 0 + }, + "value": "c", + "raw": "'c'" + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 292, + "end": 356, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 298, + "end": 355, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 298, + "end": 301, + "ctxt": 0 + }, + "value": "x23", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 304, + "end": 355, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 304, + "end": 306, + "ctxt": 0 + }, + "value": "f2", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 307, + "end": 354, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 309, + "end": 310, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 312, + "end": 313, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 315, + "end": 316, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 318, + "end": 321, + "ctxt": 0 + }, + "value": "c", + "raw": "\"c\"" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 323, + "end": 324, + "ctxt": 0 + }, + "value": "d", + "optional": false + }, + "value": { + "type": "ArrayExpression", + "span": { + "start": 326, + "end": 352, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 327, + "end": 330, + "ctxt": 0 + }, + "value": "e", + "raw": "\"e\"" + } + }, + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 332, + "end": 333, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "spread": null, + "expression": { + "type": "BooleanLiteral", + "span": { + "start": 335, + "end": 339, + "ctxt": 0 + }, + "value": true + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 341, + "end": 351, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 343, + "end": 344, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 346, + "end": 349, + "ctxt": 0 + }, + "value": "g", + "raw": "\"g\"" + } + } + ] + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 375, + "end": 377, + "ctxt": 0 + }, + "value": "f3", + "optional": false + }, + "declare": true, + "params": [ + { + "type": "Parameter", + "span": { + "start": 387, + "end": 391, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 387, + "end": 391, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 388, + "end": 391, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 390, + "end": 391, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 390, + "end": 391, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + ], + "decorators": [], + "span": { + "start": 358, + "end": 398, + "ctxt": 0 + }, + "body": null, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 377, + "end": 386, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 378, + "end": 385, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 384, + "end": 385, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 392, + "end": 397, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsArrayType", + "span": { + "start": 394, + "end": 397, + "ctxt": 0 + }, + "elemType": { + "type": "TsTypeReference", + "span": { + "start": 394, + "end": 395, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 394, + "end": 395, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 400, + "end": 424, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 406, + "end": 423, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 406, + "end": 409, + "ctxt": 0 + }, + "value": "x31", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 412, + "end": 423, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 412, + "end": 414, + "ctxt": 0 + }, + "value": "f3", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 415, + "end": 422, + "ctxt": 0 + }, + "value": "hello", + "raw": "\"hello\"" + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 425, + "end": 449, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 431, + "end": 448, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 431, + "end": 434, + "ctxt": 0 + }, + "value": "x32", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 437, + "end": 448, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 437, + "end": 439, + "ctxt": 0 + }, + "value": "f3", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 440, + "end": 447, + "ctxt": 0 + }, + "value": "hello", + "raw": "\"hello\"" + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 468, + "end": 470, + "ctxt": 0 + }, + "value": "f4", + "optional": false + }, + "declare": true, + "params": [ + { + "type": "Parameter", + "span": { + "start": 480, + "end": 491, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 480, + "end": 491, + "ctxt": 0 + }, + "value": "obj", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 483, + "end": 491, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTupleType", + "span": { + "start": 485, + "end": 491, + "ctxt": 0 + }, + "elemTypes": [ + { + "type": "TsTupleElement", + "span": { + "start": 486, + "end": 487, + "ctxt": 0 + }, + "label": null, + "ty": { + "type": "TsTypeReference", + "span": { + "start": 486, + "end": 487, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 486, + "end": 487, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + { + "type": "TsTupleElement", + "span": { + "start": 489, + "end": 490, + "ctxt": 0 + }, + "label": null, + "ty": { + "type": "TsTypeReference", + "span": { + "start": 489, + "end": 490, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 489, + "end": 490, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + ] + } + } + } + } + ], + "decorators": [], + "span": { + "start": 451, + "end": 496, + "ctxt": 0 + }, + "body": null, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 470, + "end": 479, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 471, + "end": 478, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 477, + "end": 478, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 492, + "end": 495, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 494, + "end": 495, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 494, + "end": 495, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 498, + "end": 535, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 504, + "end": 534, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 504, + "end": 507, + "ctxt": 0 + }, + "value": "x41", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 510, + "end": 534, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 510, + "end": 512, + "ctxt": 0 + }, + "value": "f4", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 513, + "end": 533, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 514, + "end": 522, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 515, + "end": 516, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 518, + "end": 521, + "ctxt": 0 + }, + "value": "x", + "raw": "'x'" + } + } + ] + } + }, + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 524, + "end": 532, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 525, + "end": 526, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 528, + "end": 531, + "ctxt": 0 + }, + "value": "y", + "raw": "'y'" + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 536, + "end": 589, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 542, + "end": 588, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 542, + "end": 545, + "ctxt": 0 + }, + "value": "x42", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 548, + "end": 588, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 548, + "end": 550, + "ctxt": 0 + }, + "value": "f4", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 551, + "end": 587, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 552, + "end": 568, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 554, + "end": 555, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 557, + "end": 558, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 560, + "end": 561, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 563, + "end": 566, + "ctxt": 0 + }, + "value": "x", + "raw": "'x'" + } + } + ] + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 570, + "end": 586, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 572, + "end": 573, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 575, + "end": 576, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 578, + "end": 579, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 581, + "end": 584, + "ctxt": 0 + }, + "value": "y", + "raw": "'y'" + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 608, + "end": 610, + "ctxt": 0 + }, + "value": "f5", + "optional": false + }, + "declare": true, + "params": [ + { + "type": "Parameter", + "span": { + "start": 620, + "end": 639, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 620, + "end": 639, + "ctxt": 0 + }, + "value": "obj", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 623, + "end": 639, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 625, + "end": 639, + "ctxt": 0 + }, + "members": [ + { + "type": "TsPropertySignature", + "span": { + "start": 627, + "end": 632, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 627, + "end": 628, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 628, + "end": 631, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 630, + "end": 631, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 630, + "end": 631, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + "typeParams": null + }, + { + "type": "TsPropertySignature", + "span": { + "start": 633, + "end": 637, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 633, + "end": 634, + "ctxt": 0 + }, + "value": "y", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 634, + "end": 637, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 636, + "end": 637, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 636, + "end": 637, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + "typeParams": null + } + ] + } + } + } + } + ], + "decorators": [], + "span": { + "start": 591, + "end": 644, + "ctxt": 0 + }, + "body": null, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 610, + "end": 619, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 611, + "end": 618, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 617, + "end": 618, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 640, + "end": 643, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 642, + "end": 643, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 642, + "end": 643, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 646, + "end": 691, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 652, + "end": 690, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 652, + "end": 655, + "ctxt": 0 + }, + "value": "x51", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 658, + "end": 690, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 658, + "end": 660, + "ctxt": 0 + }, + "value": "f5", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 661, + "end": 689, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 663, + "end": 664, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "value": { + "type": "ArrayExpression", + "span": { + "start": 666, + "end": 674, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 667, + "end": 668, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 670, + "end": 673, + "ctxt": 0 + }, + "value": "x", + "raw": "'x'" + } + } + ] + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 676, + "end": 677, + "ctxt": 0 + }, + "value": "y", + "optional": false + }, + "value": { + "type": "ArrayExpression", + "span": { + "start": 679, + "end": 687, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 680, + "end": 681, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 683, + "end": 686, + "ctxt": 0 + }, + "value": "y", + "raw": "'y'" + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 692, + "end": 753, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 698, + "end": 752, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 698, + "end": 701, + "ctxt": 0 + }, + "value": "x52", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 704, + "end": 752, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 704, + "end": 706, + "ctxt": 0 + }, + "value": "f5", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 707, + "end": 751, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 709, + "end": 710, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "value": { + "type": "ObjectExpression", + "span": { + "start": 712, + "end": 728, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 714, + "end": 715, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 717, + "end": 718, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 720, + "end": 721, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 723, + "end": 726, + "ctxt": 0 + }, + "value": "x", + "raw": "'x'" + } + } + ] + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 730, + "end": 731, + "ctxt": 0 + }, + "value": "y", + "optional": false + }, + "value": { + "type": "ObjectExpression", + "span": { + "start": 733, + "end": 749, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 735, + "end": 736, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 738, + "end": 739, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 741, + "end": 742, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 744, + "end": 747, + "ctxt": 0 + }, + "value": "y", + "raw": "'y'" + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 772, + "end": 774, + "ctxt": 0 + }, + "value": "f6", + "optional": false + }, + "declare": true, + "params": [ + { + "type": "Parameter", + "span": { + "start": 811, + "end": 821, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "RestElement", + "span": { + "start": 811, + "end": 821, + "ctxt": 0 + }, + "rest": { + "start": 811, + "end": 814, + "ctxt": 0 + }, + "argument": { + "type": "Identifier", + "span": { + "start": 814, + "end": 818, + "ctxt": 0 + }, + "value": "args", + "optional": false, + "typeAnnotation": null + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 818, + "end": 821, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 820, + "end": 821, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 820, + "end": 821, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + ], + "decorators": [], + "span": { + "start": 755, + "end": 826, + "ctxt": 0 + }, + "body": null, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 774, + "end": 810, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 775, + "end": 809, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 781, + "end": 782, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": { + "type": "TsTypeOperator", + "span": { + "start": 791, + "end": 809, + "ctxt": 0 + }, + "op": "readonly", + "typeAnnotation": { + "type": "TsArrayType", + "span": { + "start": 800, + "end": 809, + "ctxt": 0 + }, + "elemType": { + "type": "TsKeywordType", + "span": { + "start": 800, + "end": 807, + "ctxt": 0 + }, + "kind": "unknown" + } + } + }, + "default": null + } + ] + }, + "returnType": { + "type": "TsTypeAnnotation", + "span": { + "start": 822, + "end": 825, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 824, + "end": 825, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 824, + "end": 825, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + }, + { + "type": "VariableDeclaration", + "span": { + "start": 828, + "end": 869, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 834, + "end": 868, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 834, + "end": 837, + "ctxt": 0 + }, + "value": "x61", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 840, + "end": 868, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 840, + "end": 842, + "ctxt": 0 + }, + "value": "f6", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 843, + "end": 844, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 846, + "end": 849, + "ctxt": 0 + }, + "value": "b", + "raw": "'b'" + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 851, + "end": 867, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 853, + "end": 854, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 856, + "end": 857, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 859, + "end": 860, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 862, + "end": 865, + "ctxt": 0 + }, + "value": "x", + "raw": "'x'" + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "ClassDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 877, + "end": 879, + "ctxt": 0 + }, + "value": "C1", + "optional": false + }, + "declare": false, + "span": { + "start": 871, + "end": 954, + "ctxt": 0 + }, + "decorators": [], + "body": [ + { + "type": "Constructor", + "span": { + "start": 895, + "end": 915, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 895, + "end": 906, + "ctxt": 0 + }, + "value": "constructor", + "optional": false + }, + "params": [ + { + "type": "Parameter", + "span": { + "start": 907, + "end": 911, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 907, + "end": 911, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 908, + "end": 911, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 910, + "end": 911, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 910, + "end": 911, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + } + ], + "body": { + "type": "BlockStatement", + "span": { + "start": 913, + "end": 915, + "ctxt": 0 + }, + "stmts": [] + }, + "accessibility": null, + "isOptional": false + }, + { + "type": "ClassMethod", + "span": { + "start": 920, + "end": 952, + "ctxt": 0 + }, + "key": { + "type": "Identifier", + "span": { + "start": 920, + "end": 923, + "ctxt": 0 + }, + "value": "foo", + "optional": false + }, + "function": { + "params": [ + { + "type": "Parameter", + "span": { + "start": 933, + "end": 937, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 933, + "end": 937, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 934, + "end": 937, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 936, + "end": 937, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 936, + "end": 937, + "ctxt": 0 + }, + "value": "U", + "optional": false + }, + "typeParams": null + } + } + } + } + ], + "decorators": [], + "span": { + "start": 920, + "end": 952, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 939, + "end": 952, + "ctxt": 0 + }, + "stmts": [ + { + "type": "ReturnStatement", + "span": { + "start": 941, + "end": 950, + "ctxt": 0 + }, + "argument": { + "type": "Identifier", + "span": { + "start": 948, + "end": 949, + "ctxt": 0 + }, + "value": "x", + "optional": false + } + } + ] + }, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 923, + "end": 932, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 924, + "end": 931, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 930, + "end": 931, + "ctxt": 0 + }, + "value": "U", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + }, + "returnType": null + }, + "kind": "method", + "isStatic": false, + "accessibility": null, + "isAbstract": false, + "isOptional": false, + "isOverride": false + } + ], + "superClass": null, + "isAbstract": false, + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 879, + "end": 888, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 880, + "end": 887, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 886, + "end": 887, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + }, + "superTypeParams": null, + "implements": [] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 956, + "end": 1024, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 962, + "end": 1023, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 962, + "end": 965, + "ctxt": 0 + }, + "value": "c71", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "NewExpression", + "span": { + "start": 968, + "end": 1023, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 972, + "end": 974, + "ctxt": 0 + }, + "value": "C1", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 975, + "end": 1022, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 977, + "end": 978, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "value": { + "type": "NumericLiteral", + "span": { + "start": 980, + "end": 981, + "ctxt": 0 + }, + "value": 1.0, + "raw": "1" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 983, + "end": 984, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 986, + "end": 989, + "ctxt": 0 + }, + "value": "c", + "raw": "\"c\"" + } + }, + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 991, + "end": 992, + "ctxt": 0 + }, + "value": "d", + "optional": false + }, + "value": { + "type": "ArrayExpression", + "span": { + "start": 994, + "end": 1020, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 995, + "end": 998, + "ctxt": 0 + }, + "value": "e", + "raw": "\"e\"" + } + }, + { + "spread": null, + "expression": { + "type": "NumericLiteral", + "span": { + "start": 1000, + "end": 1001, + "ctxt": 0 + }, + "value": 2.0, + "raw": "2" + } + }, + { + "spread": null, + "expression": { + "type": "BooleanLiteral", + "span": { + "start": 1003, + "end": 1007, + "ctxt": 0 + }, + "value": true + } + }, + { + "spread": null, + "expression": { + "type": "ObjectExpression", + "span": { + "start": 1009, + "end": 1019, + "ctxt": 0 + }, + "properties": [ + { + "type": "KeyValueProperty", + "key": { + "type": "Identifier", + "span": { + "start": 1011, + "end": 1012, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "value": { + "type": "StringLiteral", + "span": { + "start": 1014, + "end": 1017, + "ctxt": 0 + }, + "value": "g", + "raw": "\"g\"" + } + } + ] + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 1025, + "end": 1064, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 1031, + "end": 1063, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 1031, + "end": 1034, + "ctxt": 0 + }, + "value": "c72", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "CallExpression", + "span": { + "start": 1037, + "end": 1063, + "ctxt": 0 + }, + "callee": { + "type": "MemberExpression", + "span": { + "start": 1037, + "end": 1044, + "ctxt": 0 + }, + "object": { + "type": "Identifier", + "span": { + "start": 1037, + "end": 1040, + "ctxt": 0 + }, + "value": "c71", + "optional": false + }, + "property": { + "type": "Identifier", + "span": { + "start": 1041, + "end": 1044, + "ctxt": 0 + }, + "value": "foo", + "optional": false + } + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 1045, + "end": 1062, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1046, + "end": 1049, + "ctxt": 0 + }, + "value": "a", + "raw": "'a'" + } + }, + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 1051, + "end": 1061, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1052, + "end": 1055, + "ctxt": 0 + }, + "value": "b", + "raw": "'b'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1057, + "end": 1060, + "ctxt": 0 + }, + "value": "c", + "raw": "'c'" + } + } + ] + } + } + ] + } + } + ], + "typeArguments": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 1066, + "end": 1099, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 1072, + "end": 1098, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 1072, + "end": 1075, + "ctxt": 0 + }, + "value": "fx1", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "ArrowFunctionExpression", + "span": { + "start": 1078, + "end": 1098, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 1088, + "end": 1092, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1089, + "end": 1092, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1091, + "end": 1092, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1091, + "end": 1092, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + ], + "body": { + "type": "Identifier", + "span": { + "start": 1097, + "end": 1098, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "async": false, + "generator": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1078, + "end": 1087, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1079, + "end": 1086, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1085, + "end": 1086, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "returnType": null + }, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 1100, + "end": 1134, + "ctxt": 0 + }, + "kind": "const", + "declare": false, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 1106, + "end": 1133, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 1106, + "end": 1109, + "ctxt": 0 + }, + "value": "fx2", + "optional": false, + "typeAnnotation": null + }, + "init": { + "type": "ArrowFunctionExpression", + "span": { + "start": 1112, + "end": 1133, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 1123, + "end": 1127, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1124, + "end": 1127, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1126, + "end": 1127, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1126, + "end": 1127, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + ], + "body": { + "type": "Identifier", + "span": { + "start": 1132, + "end": 1133, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "async": false, + "generator": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1112, + "end": 1122, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1113, + "end": 1120, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1119, + "end": 1120, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "returnType": null + }, + "definite": false + } + ] + }, + { + "type": "TsInterfaceDeclaration", + "span": { + "start": 1136, + "end": 1166, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 1146, + "end": 1148, + "ctxt": 0 + }, + "value": "I1", + "optional": false + }, + "declare": false, + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1148, + "end": 1157, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1149, + "end": 1156, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1155, + "end": 1156, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 1158, + "end": 1166, + "ctxt": 0 + }, + "body": [ + { + "type": "TsPropertySignature", + "span": { + "start": 1160, + "end": 1164, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 1160, + "end": 1161, + "ctxt": 0 + }, + "value": "x", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1161, + "end": 1164, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1163, + "end": 1164, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1163, + "end": 1164, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "TsInterfaceDeclaration", + "span": { + "start": 1178, + "end": 1219, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 1188, + "end": 1190, + "ctxt": 0 + }, + "value": "I2", + "optional": false + }, + "declare": false, + "typeParams": null, + "extends": [], + "body": { + "type": "TsInterfaceBody", + "span": { + "start": 1191, + "end": 1219, + "ctxt": 0 + }, + "body": [ + { + "type": "TsMethodSignature", + "span": { + "start": 1197, + "end": 1217, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 1197, + "end": 1198, + "ctxt": 0 + }, + "value": "f", + "optional": false + }, + "computed": false, + "optional": false, + "params": [ + { + "type": "Identifier", + "span": { + "start": 1208, + "end": 1212, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1209, + "end": 1212, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1211, + "end": 1212, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1211, + "end": 1212, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + ], + "typeAnn": { + "type": "TsTypeAnnotation", + "span": { + "start": 1213, + "end": 1216, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1215, + "end": 1216, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1215, + "end": 1216, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1198, + "end": 1207, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1199, + "end": 1206, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1205, + "end": 1206, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + } + } + ] + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 1221, + "end": 1242, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 1226, + "end": 1228, + "ctxt": 0 + }, + "value": "T1", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1228, + "end": 1237, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1229, + "end": 1236, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1235, + "end": 1236, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1240, + "end": 1241, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1240, + "end": 1241, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 1254, + "end": 1285, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 1259, + "end": 1261, + "ctxt": 0 + }, + "value": "T2", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsFunctionType", + "span": { + "start": 1264, + "end": 1284, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 1274, + "end": 1278, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1275, + "end": 1278, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1277, + "end": 1278, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1277, + "end": 1278, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1264, + "end": 1273, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1265, + "end": 1272, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1271, + "end": 1272, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1280, + "end": 1284, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1283, + "end": 1284, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1283, + "end": 1284, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 1286, + "end": 1319, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 1291, + "end": 1293, + "ctxt": 0 + }, + "value": "T3", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 1296, + "end": 1318, + "ctxt": 0 + }, + "members": [ + { + "type": "TsCallSignatureDeclaration", + "span": { + "start": 1298, + "end": 1316, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 1308, + "end": 1312, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1309, + "end": 1312, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1311, + "end": 1312, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1311, + "end": 1312, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + ], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1313, + "end": 1316, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1315, + "end": 1316, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1315, + "end": 1316, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1298, + "end": 1307, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1299, + "end": 1306, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1305, + "end": 1306, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + } + } + ] + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 1320, + "end": 1355, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 1325, + "end": 1327, + "ctxt": 0 + }, + "value": "T4", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsConstructorType", + "span": { + "start": 1330, + "end": 1354, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 1344, + "end": 1348, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1345, + "end": 1348, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1347, + "end": 1348, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1347, + "end": 1348, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + ], + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1334, + "end": 1343, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1335, + "end": 1342, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1341, + "end": 1342, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1350, + "end": 1354, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1353, + "end": 1354, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1353, + "end": 1354, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + "isAbstract": false + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 1356, + "end": 1393, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 1361, + "end": 1363, + "ctxt": 0 + }, + "value": "T5", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 1366, + "end": 1392, + "ctxt": 0 + }, + "members": [ + { + "type": "TsConstructSignatureDeclaration", + "span": { + "start": 1368, + "end": 1390, + "ctxt": 0 + }, + "params": [ + { + "type": "Identifier", + "span": { + "start": 1382, + "end": 1386, + "ctxt": 0 + }, + "value": "x", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1383, + "end": 1386, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1385, + "end": 1386, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1385, + "end": 1386, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + ], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1387, + "end": 1390, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1389, + "end": 1390, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1389, + "end": 1390, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1372, + "end": 1381, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1373, + "end": 1380, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1379, + "end": 1380, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": null, + "default": null + } + ] + } + } + ] + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 1427, + "end": 1465, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 1432, + "end": 1435, + "ctxt": 0 + }, + "value": "Obj", + "optional": false + }, + "typeParams": null, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 1438, + "end": 1464, + "ctxt": 0 + }, + "members": [ + { + "type": "TsPropertySignature", + "span": { + "start": 1440, + "end": 1462, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 1440, + "end": 1441, + "ctxt": 0 + }, + "value": "a", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1441, + "end": 1462, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 1443, + "end": 1462, + "ctxt": 0 + }, + "members": [ + { + "type": "TsPropertySignature", + "span": { + "start": 1445, + "end": 1460, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 1445, + "end": 1446, + "ctxt": 0 + }, + "value": "b", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1446, + "end": 1460, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeLiteral", + "span": { + "start": 1448, + "end": 1460, + "ctxt": 0 + }, + "members": [ + { + "type": "TsPropertySignature", + "span": { + "start": 1450, + "end": 1458, + "ctxt": 0 + }, + "readonly": false, + "key": { + "type": "Identifier", + "span": { + "start": 1450, + "end": 1451, + "ctxt": 0 + }, + "value": "c", + "optional": false + }, + "computed": false, + "optional": false, + "init": null, + "params": [], + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1451, + "end": 1458, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 1453, + "end": 1458, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 1453, + "end": 1458, + "ctxt": 0 + }, + "value": "123", + "raw": "\"123\"" + } + } + }, + "typeParams": null + } + ] + } + }, + "typeParams": null + } + ] + } + }, + "typeParams": null + } + ] + } + }, + { + "type": "TsTypeAliasDeclaration", + "span": { + "start": 1467, + "end": 1618, + "ctxt": 0 + }, + "declare": false, + "id": { + "type": "Identifier", + "span": { + "start": 1472, + "end": 1479, + "ctxt": 0 + }, + "value": "GetPath", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1479, + "end": 1485, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1480, + "end": 1481, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1480, + "end": 1481, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + }, + { + "type": "TsTypeParameter", + "span": { + "start": 1483, + "end": 1484, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1483, + "end": 1484, + "ctxt": 0 + }, + "value": "P", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + ] + }, + "typeAnnotation": { + "type": "TsConditionalType", + "span": { + "start": 1492, + "end": 1617, + "ctxt": 0 + }, + "checkType": { + "type": "TsTypeReference", + "span": { + "start": 1492, + "end": 1493, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1492, + "end": 1493, + "ctxt": 0 + }, + "value": "P", + "optional": false + }, + "typeParams": null + }, + "extendsType": { + "type": "TsTypeOperator", + "span": { + "start": 1502, + "end": 1513, + "ctxt": 0 + }, + "op": "readonly", + "typeAnnotation": { + "type": "TsTupleType", + "span": { + "start": 1511, + "end": 1513, + "ctxt": 0 + }, + "elemTypes": [] + } + }, + "trueType": { + "type": "TsTypeReference", + "span": { + "start": 1516, + "end": 1517, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1516, + "end": 1517, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + }, + "falseType": { + "type": "TsConditionalType", + "span": { + "start": 1524, + "end": 1617, + "ctxt": 0 + }, + "checkType": { + "type": "TsTypeReference", + "span": { + "start": 1524, + "end": 1525, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1524, + "end": 1525, + "ctxt": 0 + }, + "value": "P", + "optional": false + }, + "typeParams": null + }, + "extendsType": { + "type": "TsTypeOperator", + "span": { + "start": 1534, + "end": 1583, + "ctxt": 0 + }, + "op": "readonly", + "typeAnnotation": { + "type": "TsTupleType", + "span": { + "start": 1543, + "end": 1583, + "ctxt": 0 + }, + "elemTypes": [ + { + "type": "TsTupleElement", + "span": { + "start": 1544, + "end": 1567, + "ctxt": 0 + }, + "label": null, + "ty": { + "type": "TsInferType", + "span": { + "start": 1544, + "end": 1567, + "ctxt": 0 + }, + "typeParam": { + "type": "TsTypeParameter", + "span": { + "start": 1550, + "end": 1551, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1550, + "end": 1551, + "ctxt": 0 + }, + "value": "A", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": { + "type": "TsTypeOperator", + "span": { + "start": 1560, + "end": 1567, + "ctxt": 0 + }, + "op": "keyof", + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1566, + "end": 1567, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1566, + "end": 1567, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + }, + "default": null + } + } + }, + { + "type": "TsTupleElement", + "span": { + "start": 1569, + "end": 1582, + "ctxt": 0 + }, + "label": null, + "ty": { + "type": "TsRestType", + "span": { + "start": 1569, + "end": 1582, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsInferType", + "span": { + "start": 1572, + "end": 1582, + "ctxt": 0 + }, + "typeParam": { + "type": "TsTypeParameter", + "span": { + "start": 1578, + "end": 1582, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1578, + "end": 1582, + "ctxt": 0 + }, + "value": "Rest", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + } + } + } + } + ] + } + }, + "trueType": { + "type": "TsTypeReference", + "span": { + "start": 1586, + "end": 1605, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1586, + "end": 1593, + "ctxt": 0 + }, + "value": "GetPath", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 1593, + "end": 1605, + "ctxt": 0 + }, + "params": [ + { + "type": "TsIndexedAccessType", + "span": { + "start": 1594, + "end": 1598, + "ctxt": 0 + }, + "readonly": false, + "objectType": { + "type": "TsTypeReference", + "span": { + "start": 1594, + "end": 1595, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1594, + "end": 1595, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + }, + "indexType": { + "type": "TsTypeReference", + "span": { + "start": 1596, + "end": 1597, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1596, + "end": 1597, + "ctxt": 0 + }, + "value": "A", + "optional": false + }, + "typeParams": null + } + }, + { + "type": "TsTypeReference", + "span": { + "start": 1600, + "end": 1604, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1600, + "end": 1604, + "ctxt": 0 + }, + "value": "Rest", + "optional": false + }, + "typeParams": null + } + ] + } + }, + "falseType": { + "type": "TsKeywordType", + "span": { + "start": 1612, + "end": 1617, + "ctxt": 0 + }, + "kind": "never" + } + } + } + }, + { + "type": "FunctionDeclaration", + "identifier": { + "type": "Identifier", + "span": { + "start": 1629, + "end": 1632, + "ctxt": 0 + }, + "value": "set", + "optional": false + }, + "declare": false, + "params": [ + { + "type": "Parameter", + "span": { + "start": 1671, + "end": 1677, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 1671, + "end": 1677, + "ctxt": 0 + }, + "value": "obj", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1674, + "end": 1677, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1676, + "end": 1677, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1676, + "end": 1677, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + } + } + } + }, + { + "type": "Parameter", + "span": { + "start": 1679, + "end": 1686, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 1679, + "end": 1686, + "ctxt": 0 + }, + "value": "path", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1683, + "end": 1686, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1685, + "end": 1686, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1685, + "end": 1686, + "ctxt": 0 + }, + "value": "P", + "optional": false + }, + "typeParams": null + } + } + } + }, + { + "type": "Parameter", + "span": { + "start": 1688, + "end": 1708, + "ctxt": 0 + }, + "decorators": [], + "pat": { + "type": "Identifier", + "span": { + "start": 1688, + "end": 1708, + "ctxt": 0 + }, + "value": "value", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1693, + "end": 1708, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1695, + "end": 1708, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1695, + "end": 1702, + "ctxt": 0 + }, + "value": "GetPath", + "optional": false + }, + "typeParams": { + "type": "TsTypeParameterInstantiation", + "span": { + "start": 1702, + "end": 1708, + "ctxt": 0 + }, + "params": [ + { + "type": "TsTypeReference", + "span": { + "start": 1703, + "end": 1704, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1703, + "end": 1704, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "typeParams": null + }, + { + "type": "TsTypeReference", + "span": { + "start": 1706, + "end": 1707, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1706, + "end": 1707, + "ctxt": 0 + }, + "value": "P", + "optional": false + }, + "typeParams": null + } + ] + } + } + } + } + } + ], + "decorators": [], + "span": { + "start": 1620, + "end": 1712, + "ctxt": 0 + }, + "body": { + "type": "BlockStatement", + "span": { + "start": 1710, + "end": 1712, + "ctxt": 0 + }, + "stmts": [] + }, + "generator": false, + "async": false, + "typeParameters": { + "type": "TsTypeParameterDeclaration", + "span": { + "start": 1632, + "end": 1670, + "ctxt": 0 + }, + "parameters": [ + { + "type": "TsTypeParameter", + "span": { + "start": 1633, + "end": 1634, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1633, + "end": 1634, + "ctxt": 0 + }, + "value": "T", + "optional": false + }, + "in": false, + "out": false, + "const": false, + "constraint": null, + "default": null + }, + { + "type": "TsTypeParameter", + "span": { + "start": 1636, + "end": 1669, + "ctxt": 0 + }, + "name": { + "type": "Identifier", + "span": { + "start": 1642, + "end": 1643, + "ctxt": 0 + }, + "value": "P", + "optional": false + }, + "in": false, + "out": false, + "const": true, + "constraint": { + "type": "TsTypeOperator", + "span": { + "start": 1652, + "end": 1669, + "ctxt": 0 + }, + "op": "readonly", + "typeAnnotation": { + "type": "TsArrayType", + "span": { + "start": 1661, + "end": 1669, + "ctxt": 0 + }, + "elemType": { + "type": "TsKeywordType", + "span": { + "start": 1661, + "end": 1667, + "ctxt": 0 + }, + "kind": "string" + } + } + }, + "default": null + } + ] + }, + "returnType": null + }, + { + "type": "VariableDeclaration", + "span": { + "start": 1714, + "end": 1735, + "ctxt": 0 + }, + "kind": "let", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 1726, + "end": 1734, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 1726, + "end": 1729, + "ctxt": 0 + }, + "value": "obj", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1729, + "end": 1734, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsTypeReference", + "span": { + "start": 1731, + "end": 1734, + "ctxt": 0 + }, + "typeName": { + "type": "Identifier", + "span": { + "start": 1731, + "end": 1734, + "ctxt": 0 + }, + "value": "Obj", + "optional": false + }, + "typeParams": null + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "VariableDeclaration", + "span": { + "start": 1736, + "end": 1761, + "ctxt": 0 + }, + "kind": "let", + "declare": true, + "declarations": [ + { + "type": "VariableDeclarator", + "span": { + "start": 1748, + "end": 1760, + "ctxt": 0 + }, + "id": { + "type": "Identifier", + "span": { + "start": 1748, + "end": 1753, + "ctxt": 0 + }, + "value": "value", + "optional": false, + "typeAnnotation": { + "type": "TsTypeAnnotation", + "span": { + "start": 1753, + "end": 1760, + "ctxt": 0 + }, + "typeAnnotation": { + "type": "TsLiteralType", + "span": { + "start": 1755, + "end": 1760, + "ctxt": 0 + }, + "literal": { + "type": "StringLiteral", + "span": { + "start": 1755, + "end": 1760, + "ctxt": 0 + }, + "value": "123", + "raw": "\"123\"" + } + } + } + }, + "init": null, + "definite": false + } + ] + }, + { + "type": "ExpressionStatement", + "span": { + "start": 1763, + "end": 1796, + "ctxt": 0 + }, + "expression": { + "type": "CallExpression", + "span": { + "start": 1763, + "end": 1795, + "ctxt": 0 + }, + "callee": { + "type": "Identifier", + "span": { + "start": 1763, + "end": 1766, + "ctxt": 0 + }, + "value": "set", + "optional": false + }, + "arguments": [ + { + "spread": null, + "expression": { + "type": "Identifier", + "span": { + "start": 1767, + "end": 1770, + "ctxt": 0 + }, + "value": "obj", + "optional": false + } + }, + { + "spread": null, + "expression": { + "type": "ArrayExpression", + "span": { + "start": 1772, + "end": 1787, + "ctxt": 0 + }, + "elements": [ + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1773, + "end": 1776, + "ctxt": 0 + }, + "value": "a", + "raw": "'a'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1778, + "end": 1781, + "ctxt": 0 + }, + "value": "b", + "raw": "'b'" + } + }, + { + "spread": null, + "expression": { + "type": "StringLiteral", + "span": { + "start": 1783, + "end": 1786, + "ctxt": 0 + }, + "value": "c", + "raw": "'c'" + } + } + ] + } + }, + { + "spread": null, + "expression": { + "type": "Identifier", + "span": { + "start": 1789, + "end": 1794, + "ctxt": 0 + }, + "value": "value", + "optional": false + } + } + ], + "typeArguments": null + } + } + ], + "interpreter": null +} diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiers.ts b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiers.ts new file mode 100644 index 000000000000..4a3b3bf59540 --- /dev/null +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterConstModifiers.ts @@ -0,0 +1,72 @@ +// @strict: true + +declare function f1(x: T): T; + +const x11 = f1('a'); +const x12 = f1(['a', ['b', 'c']]); +const x13 = f1({ a: 1, b: "c", d: ["e", 2, true, { f: "g" }] }); + +declare function f2(x: T | undefined): T; + +const x21 = f2('a'); +const x22 = f2(['a', ['b', 'c']]); +const x23 = f2({ a: 1, b: "c", d: ["e", 2, true, { f: "g" }] }); + +declare function f3(x: T): T[]; + +const x31 = f3("hello"); +const x32 = f3("hello"); + +declare function f4(obj: [T, T]): T; + +const x41 = f4([[1, 'x'], [2, 'y']]); +const x42 = f4([{ a: 1, b: 'x' }, { a: 2, b: 'y' }]); + +declare function f5(obj: { x: T, y: T }): T; + +const x51 = f5({ x: [1, 'x'], y: [2, 'y'] }); +const x52 = f5({ x: { a: 1, b: 'x' }, y: { a: 2, b: 'y' } }); + +declare function f6(...args: T): T; + +const x61 = f6(1, 'b', { a: 1, b: 'x' }); + +class C1 { + constructor(x: T) {} + foo(x: U) { return x; } +} + +const c71 = new C1({ a: 1, b: "c", d: ["e", 2, true, { f: "g" }] }); +const c72 = c71.foo(['a', ['b', 'c']]); + +const fx1 = (x: T) => x; +const fx2 = (x: T) => x; + +interface I1 { x: T } // Error + +interface I2 { + f(x: T): T; +} + +type T1 = T; // Error + +type T2 = (x: T) => T; +type T3 = { (x: T): T }; +type T4 = new (x: T) => T; +type T5 = { new (x: T): T }; + +// Corrected repro from #51745 + +type Obj = { a: { b: { c: "123" } } }; + +type GetPath = + P extends readonly [] ? T : + P extends readonly [infer A extends keyof T, ...infer Rest] ? GetPath : + never; + +function set(obj: T, path: P, value: GetPath) {} + +declare let obj: Obj; +declare let value: "123"; + +set(obj, ['a', 'b', 'c'], value); diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterDirectlyConstrainedToItself.json b/crates/swc_ecma_parser/tests/tsc/typeParameterDirectlyConstrainedToItself.json index 223faf909033..16f2469d8dc5 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterDirectlyConstrainedToItself.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterDirectlyConstrainedToItself.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -130,6 +131,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -152,6 +154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -223,6 +226,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -302,6 +306,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -324,6 +329,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -416,6 +422,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -499,6 +506,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -521,6 +529,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -639,6 +648,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -715,6 +725,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -737,6 +748,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -844,6 +856,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -947,6 +960,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -969,6 +983,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterExtendsUnionConstraintDistributed.json b/crates/swc_ecma_parser/tests/tsc/typeParameterExtendsUnionConstraintDistributed.json index 02eac250e7e9..b15ac8b6e51d 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterExtendsUnionConstraintDistributed.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterExtendsUnionConstraintDistributed.json @@ -196,6 +196,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -495,6 +496,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -535,6 +537,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterIndirectlyConstrainedToItself.json b/crates/swc_ecma_parser/tests/tsc/typeParameterIndirectlyConstrainedToItself.json index ded637ddecf1..e9c5d788c5bf 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterIndirectlyConstrainedToItself.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterIndirectlyConstrainedToItself.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -95,6 +96,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -170,6 +172,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -210,6 +213,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -250,6 +254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -321,6 +326,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -361,6 +367,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -440,6 +447,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -480,6 +488,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -520,6 +529,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -612,6 +622,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -652,6 +663,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -735,6 +747,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -775,6 +788,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -815,6 +829,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -933,6 +948,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -973,6 +989,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1049,6 +1066,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1089,6 +1107,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1129,6 +1148,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1236,6 +1256,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1276,6 +1297,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1379,6 +1401,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1419,6 +1442,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1459,6 +1483,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1537,6 +1562,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1577,6 +1603,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1617,6 +1644,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1688,6 +1716,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1844,6 +1873,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsConstraint.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsConstraint.json index 687d4e9bc229..66aae358d0c8 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsConstraint.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -77,6 +78,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -152,6 +154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -192,6 +195,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -249,6 +253,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -289,6 +294,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -364,6 +370,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -404,6 +411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -479,6 +487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -519,6 +528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -559,6 +569,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -616,6 +627,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -638,6 +650,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -678,6 +691,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -749,6 +763,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -771,6 +786,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -850,6 +866,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -890,6 +907,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -951,6 +969,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -991,6 +1010,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1070,6 +1090,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1110,6 +1131,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1189,6 +1211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1229,6 +1252,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1269,6 +1293,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1330,6 +1355,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1352,6 +1378,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1392,6 +1419,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1484,6 +1512,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1506,6 +1535,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1589,6 +1619,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1629,6 +1660,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1694,6 +1726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1734,6 +1767,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1817,6 +1851,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1857,6 +1892,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1940,6 +1976,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1980,6 +2017,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2020,6 +2058,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2085,6 +2124,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2107,6 +2147,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2147,6 +2188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2246,6 +2288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2268,6 +2311,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2371,6 +2415,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2411,6 +2456,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2496,6 +2542,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2536,6 +2583,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2639,6 +2687,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2679,6 +2728,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2782,6 +2832,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2822,6 +2873,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2862,6 +2914,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2947,6 +3000,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2969,6 +3023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3009,6 +3064,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3131,6 +3187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3153,6 +3210,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3279,6 +3337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3319,6 +3378,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3427,6 +3487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3467,6 +3528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3593,6 +3655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3633,6 +3696,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3759,6 +3823,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3799,6 +3864,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3839,6 +3905,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3947,6 +4014,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3969,6 +4037,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4009,6 +4078,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint.json index c4134684ec2e..f288f8fa2118 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint.json @@ -214,6 +214,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -236,6 +237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -495,6 +497,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -535,6 +538,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -794,6 +798,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -816,6 +821,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1097,6 +1103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1137,6 +1144,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1380,6 +1388,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1402,6 +1411,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1663,6 +1673,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1703,6 +1714,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint2.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint2.json index 537fd97a8c79..798d3924a956 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint2.json @@ -363,6 +363,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -403,6 +404,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -485,6 +487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -525,6 +528,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -581,6 +585,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -603,6 +608,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -985,6 +991,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1025,6 +1032,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1107,6 +1115,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1147,6 +1156,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1203,6 +1213,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1243,6 +1254,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1643,6 +1655,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1683,6 +1696,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1769,6 +1783,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1809,6 +1824,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1865,6 +1881,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1887,6 +1904,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2318,6 +2336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2358,6 +2377,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2444,6 +2464,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2484,6 +2505,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2540,6 +2562,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2580,6 +2603,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2944,6 +2968,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2984,6 +3009,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3070,6 +3096,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3110,6 +3137,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3166,6 +3194,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3188,6 +3217,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3570,6 +3600,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3610,6 +3641,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3696,6 +3728,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3736,6 +3769,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3792,6 +3826,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3832,6 +3867,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json index fb4fbeed0348..0eb8cedea580 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint3.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -73,6 +74,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -95,6 +97,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -375,6 +378,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -447,6 +451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -469,6 +474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -491,6 +497,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -771,6 +778,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json index 0a0960c2c1f2..d84cf9b0b136 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParameterUsedAsTypeParameterConstraint4.json @@ -269,6 +269,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -357,6 +358,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -379,6 +381,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -419,6 +422,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -490,6 +494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -512,6 +517,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -552,6 +558,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -850,6 +857,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1234,6 +1242,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1274,6 +1283,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1356,6 +1366,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1396,6 +1407,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1478,6 +1490,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1500,6 +1513,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1908,6 +1922,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -1948,6 +1963,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2030,6 +2046,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2070,6 +2087,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2152,6 +2170,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2192,6 +2211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2671,6 +2691,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2711,6 +2732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2797,6 +2819,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2837,6 +2860,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2893,6 +2917,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2915,6 +2940,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3297,6 +3323,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3337,6 +3364,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3423,6 +3451,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3463,6 +3492,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3519,6 +3549,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -3559,6 +3590,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json index 15b6f5474177..33371eabcb8a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAreIdenticalToThemselves.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -207,6 +208,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -319,6 +321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -423,6 +426,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -445,6 +449,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -549,6 +554,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -571,6 +577,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -683,6 +690,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -705,6 +713,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1230,6 +1239,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1339,6 +1349,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1361,6 +1372,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1799,6 +1811,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1961,6 +1974,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2131,6 +2145,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2247,6 +2262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2363,6 +2379,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2487,6 +2504,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2603,6 +2621,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2737,6 +2756,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2879,6 +2899,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -2941,6 +2962,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3380,6 +3402,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3542,6 +3565,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3712,6 +3736,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3828,6 +3853,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3944,6 +3970,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4068,6 +4095,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4112,6 +4140,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4183,6 +4212,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4445,6 +4475,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4575,6 +4606,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4668,6 +4700,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4761,6 +4794,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4854,6 +4888,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4965,6 +5000,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5037,6 +5073,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5317,6 +5354,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5447,6 +5485,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5540,6 +5579,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5633,6 +5673,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope.json index 350eb7841714..b144cfac7495 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope.json @@ -260,6 +260,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -494,6 +495,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -612,6 +614,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope2.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope2.json index 60c4f5d09bc5..e1a0cd870d8a 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope2.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope2.json @@ -485,6 +485,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -523,6 +524,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -561,6 +563,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -583,6 +586,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope3.json b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope3.json index 1ea410f7834e..984d3741205f 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope3.json +++ b/crates/swc_ecma_parser/tests/tsc/typeParametersAvailableInNestedScope3.json @@ -205,6 +205,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -490,6 +491,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -645,6 +647,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -731,6 +734,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeQueryOnClass.json b/crates/swc_ecma_parser/tests/tsc/typeQueryOnClass.json index da3e06020e76..f177d1ad8104 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeQueryOnClass.json +++ b/crates/swc_ecma_parser/tests/tsc/typeQueryOnClass.json @@ -1202,6 +1202,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1610,6 +1611,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeofClassWithPrivates.json b/crates/swc_ecma_parser/tests/tsc/typeofClassWithPrivates.json index 364b1ca7988f..ddf23a062a6d 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofClassWithPrivates.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofClassWithPrivates.json @@ -256,6 +256,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typeofTypeParameter.json b/crates/swc_ecma_parser/tests/tsc/typeofTypeParameter.json index 92b6ff5347bf..3f66deff3af4 100644 --- a/crates/swc_ecma_parser/tests/tsc/typeofTypeParameter.json +++ b/crates/swc_ecma_parser/tests/tsc/typeofTypeParameter.json @@ -248,6 +248,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/typesWithDuplicateTypeParameters.json b/crates/swc_ecma_parser/tests/tsc/typesWithDuplicateTypeParameters.json index 4ae8943726ff..02b3f41f0e86 100644 --- a/crates/swc_ecma_parser/tests/tsc/typesWithDuplicateTypeParameters.json +++ b/crates/swc_ecma_parser/tests/tsc/typesWithDuplicateTypeParameters.json @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -77,6 +78,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -134,6 +136,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -156,6 +159,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -178,6 +182,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -231,6 +236,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -253,6 +259,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -314,6 +321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -336,6 +344,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -358,6 +367,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -432,6 +442,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -454,6 +465,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -519,6 +531,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -541,6 +554,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -563,6 +577,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json b/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json index b3c1cd8ab5b9..0dbf7364af63 100644 --- a/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json +++ b/crates/swc_ecma_parser/tests/tsc/undefinedAssignableToEveryType.json @@ -1486,6 +1486,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1983,6 +1984,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2005,6 +2007,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2027,6 +2030,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/undefinedIsSubtypeOfEverything.json b/crates/swc_ecma_parser/tests/tsc/undefinedIsSubtypeOfEverything.json index 0c1cacfbc607..1737452df3d0 100644 --- a/crates/swc_ecma_parser/tests/tsc/undefinedIsSubtypeOfEverything.json +++ b/crates/swc_ecma_parser/tests/tsc/undefinedIsSubtypeOfEverything.json @@ -2217,6 +2217,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2339,6 +2340,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2361,6 +2363,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json index 3b543a2ef5f9..7b39f68b50b1 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference1.json @@ -662,6 +662,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -684,6 +685,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1146,6 +1148,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1339,6 +1342,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1622,6 +1626,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1868,6 +1873,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1936,6 +1942,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2121,6 +2128,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2643,6 +2651,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3465,6 +3474,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3487,6 +3497,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3692,6 +3703,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3714,6 +3726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4027,6 +4040,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4243,6 +4257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4265,6 +4280,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json index 7fc937040dd6..9af964b922f4 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference2.json @@ -122,6 +122,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -911,6 +912,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json index e288eefdbd4e..13785c1320f1 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json +++ b/crates/swc_ecma_parser/tests/tsc/unionAndIntersectionInference3.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -315,6 +316,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -735,6 +737,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -757,6 +760,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -779,6 +783,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1124,6 +1129,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1146,6 +1152,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1168,6 +1175,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1278,6 +1286,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1418,6 +1427,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1761,6 +1771,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2020,6 +2031,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2209,6 +2221,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2348,6 +2361,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2690,6 +2704,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2949,6 +2964,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3245,6 +3261,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3402,6 +3419,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3979,6 +3997,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4039,6 +4058,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4202,6 +4222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4326,6 +4347,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4671,6 +4693,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -4711,6 +4734,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -5140,6 +5164,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5432,6 +5457,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5454,6 +5480,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json b/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json index 2d97034f4249..902939cdd2d7 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json +++ b/crates/swc_ecma_parser/tests/tsc/unionSubtypeIfEveryConstituentTypeIsSubtype.json @@ -2503,6 +2503,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3142,6 +3143,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4350,6 +4352,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures2.json b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures2.json index 2dc72bbaccc9..7d2f3edee55d 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures2.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeCallSignatures2.json @@ -352,6 +352,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -680,6 +681,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1019,6 +1021,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json b/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json index fb0b764a209c..8ba944859816 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeInference.json @@ -334,6 +334,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1052,6 +1053,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1309,6 +1311,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1787,6 +1790,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2070,6 +2074,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2375,6 +2380,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2437,6 +2443,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2742,6 +2749,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3108,6 +3116,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3447,6 +3456,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3681,6 +3691,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3780,6 +3791,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4579,6 +4591,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4631,6 +4644,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4663,6 +4677,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4954,6 +4969,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json b/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json index 20b78a22d4c4..3ecdb05b62b5 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypeMembers.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -552,6 +553,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -715,6 +717,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1216,6 +1219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unionTypesAssignability.json b/crates/swc_ecma_parser/tests/tsc/unionTypesAssignability.json index cddf7e3c67bd..47b8badcebad 100644 --- a/crates/swc_ecma_parser/tests/tsc/unionTypesAssignability.json +++ b/crates/swc_ecma_parser/tests/tsc/unionTypesAssignability.json @@ -2622,6 +2622,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2644,6 +2645,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json index 5da2e5736f49..a848f94fe578 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbols.json @@ -5321,6 +5321,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json index f3ab26ca07c8..ca26bbb99f7d 100644 --- a/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json +++ b/crates/swc_ecma_parser/tests/tsc/uniqueSymbolsDeclarations.json @@ -5238,6 +5238,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/unknownType1.json b/crates/swc_ecma_parser/tests/tsc/unknownType1.json index 96662bb674ba..8b8a023d84e5 100644 --- a/crates/swc_ecma_parser/tests/tsc/unknownType1.json +++ b/crates/swc_ecma_parser/tests/tsc/unknownType1.json @@ -757,6 +757,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -846,6 +847,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -935,6 +937,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1024,6 +1027,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1113,6 +1117,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1234,6 +1239,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1355,6 +1361,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1476,6 +1483,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1597,6 +1605,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3102,6 +3111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3134,6 +3144,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -3871,6 +3882,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4556,6 +4568,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6189,6 +6202,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -6211,6 +6225,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6389,6 +6404,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -6692,6 +6708,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/unknownType2.json b/crates/swc_ecma_parser/tests/tsc/unknownType2.json index 41813a3bc9a1..43dae9279f65 100644 --- a/crates/swc_ecma_parser/tests/tsc/unknownType2.json +++ b/crates/swc_ecma_parser/tests/tsc/unknownType2.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -172,6 +173,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsLiteralType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json b/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json index 3df5ab7dfbf5..5b66cd731a74 100644 --- a/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/validNullAssignments.json @@ -1187,6 +1187,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json b/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json index 0126e87afca6..0b98975dd8d7 100644 --- a/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json +++ b/crates/swc_ecma_parser/tests/tsc/validUndefinedAssignments.json @@ -984,6 +984,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json index 72d144c5808b..0e1b923f6a00 100644 --- a/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json +++ b/crates/swc_ecma_parser/tests/tsc/variadicTuples1.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -182,6 +183,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -331,6 +333,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -516,6 +519,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -1523,6 +1527,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -1561,6 +1566,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -1959,6 +1965,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -1997,6 +2004,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -2788,6 +2796,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -2835,6 +2844,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -4139,6 +4149,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -4556,6 +4567,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -4676,6 +4688,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -4822,6 +4835,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -5031,6 +5045,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -5204,6 +5219,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6020,6 +6036,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6520,6 +6537,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -6931,6 +6949,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -7360,6 +7379,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -7428,6 +7448,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -7460,6 +7481,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -7594,6 +7616,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -7822,6 +7845,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -7999,6 +8023,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -8335,6 +8360,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -8700,6 +8726,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -9235,6 +9262,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -9273,6 +9301,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9452,6 +9481,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9996,6 +10026,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -10034,6 +10065,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10625,6 +10657,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -10663,6 +10696,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -11177,6 +11211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -11689,6 +11724,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -12201,6 +12237,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -12239,6 +12276,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -12744,6 +12782,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -12791,6 +12830,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -13573,6 +13613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -13611,6 +13652,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -13681,6 +13723,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -13966,6 +14009,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -14105,6 +14149,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -14226,6 +14271,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -14366,6 +14412,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -14631,6 +14678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -14744,6 +14792,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -21445,6 +21494,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -21483,6 +21533,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -21521,6 +21572,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -23490,6 +23542,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -23528,6 +23581,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -23566,6 +23620,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -24167,6 +24222,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -24932,6 +24988,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -24970,6 +25027,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -25402,6 +25460,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -25868,6 +25927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -26033,6 +26093,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -26214,6 +26275,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -26672,6 +26734,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -26740,6 +26803,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -26778,6 +26842,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -27261,6 +27326,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -27299,6 +27365,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -27337,6 +27404,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -28346,6 +28414,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -28392,6 +28461,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", diff --git a/crates/swc_ecma_parser/tests/tsc/variance.json b/crates/swc_ecma_parser/tests/tsc/variance.json index 68798d9bf38a..1859dc8490ed 100644 --- a/crates/swc_ecma_parser/tests/tsc/variance.json +++ b/crates/swc_ecma_parser/tests/tsc/variance.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -945,6 +946,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json b/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json index 07964cd1b197..0936fad5ca43 100644 --- a/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json +++ b/crates/swc_ecma_parser/tests/tsc/voidParamAssignmentCompatibility.json @@ -206,6 +206,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/tsc/wideningTuples1.json b/crates/swc_ecma_parser/tests/tsc/wideningTuples1.json index a8e127774f30..ab6ed63a9edc 100644 --- a/crates/swc_ecma_parser/tests/tsc/wideningTuples1.json +++ b/crates/swc_ecma_parser/tests/tsc/wideningTuples1.json @@ -103,6 +103,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTupleType", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json index 4b5ce3cf182c..f42d1ecead4b 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints.json @@ -235,6 +235,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -297,6 +298,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.json index 29df2349c273..1aa67f9bcf22 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints2.json @@ -133,6 +133,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json index 8b136a66295e..74bbd47b0dfa 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints3.json @@ -307,6 +307,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -381,6 +382,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -443,6 +445,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json index c53f06951ae3..f5a0ce4c6427 100644 --- a/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json +++ b/crates/swc_ecma_parser/tests/tsc/wrappedAndRecursiveConstraints4.json @@ -307,6 +307,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -381,6 +382,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -443,6 +445,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts b/crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts new file mode 100644 index 000000000000..4a3b3bf59540 --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts @@ -0,0 +1,72 @@ +// @strict: true + +declare function f1(x: T): T; + +const x11 = f1('a'); +const x12 = f1(['a', ['b', 'c']]); +const x13 = f1({ a: 1, b: "c", d: ["e", 2, true, { f: "g" }] }); + +declare function f2(x: T | undefined): T; + +const x21 = f2('a'); +const x22 = f2(['a', ['b', 'c']]); +const x23 = f2({ a: 1, b: "c", d: ["e", 2, true, { f: "g" }] }); + +declare function f3(x: T): T[]; + +const x31 = f3("hello"); +const x32 = f3("hello"); + +declare function f4(obj: [T, T]): T; + +const x41 = f4([[1, 'x'], [2, 'y']]); +const x42 = f4([{ a: 1, b: 'x' }, { a: 2, b: 'y' }]); + +declare function f5(obj: { x: T, y: T }): T; + +const x51 = f5({ x: [1, 'x'], y: [2, 'y'] }); +const x52 = f5({ x: { a: 1, b: 'x' }, y: { a: 2, b: 'y' } }); + +declare function f6(...args: T): T; + +const x61 = f6(1, 'b', { a: 1, b: 'x' }); + +class C1 { + constructor(x: T) {} + foo(x: U) { return x; } +} + +const c71 = new C1({ a: 1, b: "c", d: ["e", 2, true, { f: "g" }] }); +const c72 = c71.foo(['a', ['b', 'c']]); + +const fx1 = (x: T) => x; +const fx2 = (x: T) => x; + +interface I1 { x: T } // Error + +interface I2 { + f(x: T): T; +} + +type T1 = T; // Error + +type T2 = (x: T) => T; +type T3 = { (x: T): T }; +type T4 = new (x: T) => T; +type T5 = { new (x: T): T }; + +// Corrected repro from #51745 + +type Obj = { a: { b: { c: "123" } } }; + +type GetPath = + P extends readonly [] ? T : + P extends readonly [infer A extends keyof T, ...infer Rest] ? GetPath : + never; + +function set(obj: T, path: P, value: GetPath) {} + +declare let obj: Obj; +declare let value: "123"; + +set(obj, ['a', 'b', 'c'], value); diff --git a/crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts.swc-stderr b/crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts.swc-stderr new file mode 100644 index 000000000000..f0ce2d759b55 --- /dev/null +++ b/crates/swc_ecma_parser/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts.swc-stderr @@ -0,0 +1,14 @@ + + x 'const' modifier can only appear on a type parameter of a function, method or class + ,-[$DIR/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts:44:1] + 44 | + 45 | interface I1 { x: T } // Error + : ^^^^^ + `---- + + x 'const' modifier can only appear on a type parameter of a function, method or class + ,-[$DIR/tests/typescript-errors/type-parameter-lists/typeParameterConstModifiers.ts:50:1] + 50 | + 51 | type T1 = T; // Error + : ^^^^^ + `---- diff --git a/crates/swc_ecma_parser/tests/typescript/arrow-function/async-await-null/input.ts.json b/crates/swc_ecma_parser/tests/typescript/arrow-function/async-await-null/input.ts.json index 434c49fe195f..2db7055f4ccd 100644 --- a/crates/swc_ecma_parser/tests/typescript/arrow-function/async-await-null/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/arrow-function/async-await-null/input.ts.json @@ -66,6 +66,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts.json index 6a2b1d8d1e90..bfd735501e74 100644 --- a/crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/arrow-function/async-generic/input.ts.json @@ -98,6 +98,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/arrow-function/generic-tsx/input.ts.json b/crates/swc_ecma_parser/tests/typescript/arrow-function/generic-tsx/input.ts.json index 43d598306097..559db9422cc1 100644 --- a/crates/swc_ecma_parser/tests/typescript/arrow-function/generic-tsx/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/arrow-function/generic-tsx/input.ts.json @@ -98,6 +98,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/arrow-function/generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/arrow-function/generic/input.ts.json index fcf220d285c2..b76f9d85ec99 100644 --- a/crates/swc_ecma_parser/tests/typescript/arrow-function/generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/arrow-function/generic/input.ts.json @@ -98,6 +98,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/class/expression-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/expression-generic/input.ts.json index 8dfa3ab692c4..41a296774697 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/expression-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/expression-generic/input.ts.json @@ -59,6 +59,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -131,6 +132,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": 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 0ff940f53e88..56f95173fedf 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 @@ -55,6 +55,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/class/get-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/get-generic/input.ts.json index 8242dfeeaa7a..afd29f77fafe 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/get-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/get-generic/input.ts.json @@ -81,6 +81,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/class/members-with-modifier-names/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/members-with-modifier-names/input.ts.json index fb92caf8813b..d06ca4ae3a03 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/members-with-modifier-names/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/members-with-modifier-names/input.ts.json @@ -227,6 +227,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts.json index a744b6436bc1..cd17609015f0 100644 --- a/crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/class/method-generic/input.ts.json @@ -250,6 +250,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -379,6 +380,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/custom/tsx-issue-573/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/custom/tsx-issue-573/input.tsx.json index 253693733872..ec738a8a8aa3 100644 --- a/crates/swc_ecma_parser/tests/typescript/custom/tsx-issue-573/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/custom/tsx-issue-573/input.tsx.json @@ -119,6 +119,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case1/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case1/input.tsx.json index e41febbb1f51..7d44a0786b40 100644 --- a/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case1/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case1/input.tsx.json @@ -244,6 +244,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -302,6 +303,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case2/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case2/input.tsx.json index 036861ff91f4..fa4cdbd2837b 100644 --- a/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case2/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/deno-discord/2021-02-17/case2/input.tsx.json @@ -277,6 +277,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -335,6 +336,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { 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 275597756090..44271d2f79e9 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 @@ -78,6 +78,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -313,6 +314,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -584,6 +586,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -974,6 +977,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1114,6 +1118,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1302,6 +1307,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -1324,6 +1330,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2357,6 +2364,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -2379,6 +2387,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2511,6 +2520,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3344,6 +3354,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3467,6 +3478,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -3489,6 +3501,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4163,6 +4176,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4185,6 +4199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4475,6 +4490,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -8763,6 +8779,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -9688,6 +9705,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -10210,6 +10228,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -11237,6 +11256,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11425,6 +11445,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11557,6 +11578,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -11819,6 +11841,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12013,6 +12036,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12364,6 +12388,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -12646,6 +12671,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -32792,6 +32818,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -37940,6 +37967,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -38171,6 +38199,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -38471,6 +38500,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -38840,6 +38870,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -42499,6 +42530,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -42521,6 +42553,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -42543,6 +42576,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsUnionType", "span": { @@ -46748,6 +46782,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -46770,6 +46805,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -46949,6 +46985,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -46971,6 +47008,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -47148,6 +47186,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -47170,6 +47209,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -47447,6 +47487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -47469,6 +47510,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -49036,6 +49078,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -50976,6 +51019,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -50998,6 +51042,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -51468,6 +51513,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -51660,6 +51706,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -52235,6 +52282,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -54603,6 +54651,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": 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 b3639fc6408f..e55c4b1a0f59 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 @@ -211,6 +211,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { @@ -282,6 +283,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", diff --git a/crates/swc_ecma_parser/tests/typescript/function/annotated/input.ts.json b/crates/swc_ecma_parser/tests/typescript/function/annotated/input.ts.json index aa47c350e043..b46d5b51ec0a 100644 --- a/crates/swc_ecma_parser/tests/typescript/function/annotated/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/function/annotated/input.ts.json @@ -111,6 +111,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/function/anonymous/input.ts.json b/crates/swc_ecma_parser/tests/typescript/function/anonymous/input.ts.json index 17a4d5cda93f..8c47d5feebb3 100644 --- a/crates/swc_ecma_parser/tests/typescript/function/anonymous/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/function/anonymous/input.ts.json @@ -129,6 +129,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/function/declare/input.ts.json b/crates/swc_ecma_parser/tests/typescript/function/declare/input.ts.json index 8796652f0fcb..2694db5e5f3b 100644 --- a/crates/swc_ecma_parser/tests/typescript/function/declare/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/function/declare/input.ts.json @@ -98,6 +98,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } 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 f68b86759ff0..57abb7a65acf 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 @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "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 f87885073869..2e8929ed7d13 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 @@ -109,6 +109,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1252/case1/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-1252/case1/input.tsx.json index c4554dade9f7..042acc50c13e 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1252/case1/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1252/case1/input.tsx.json @@ -332,6 +332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1299/ts/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-1299/ts/input.ts.json index 44c1a7310d24..1a275b00cdbb 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1299/ts/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1299/ts/input.ts.json @@ -257,6 +257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -279,6 +280,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1299/tsx/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-1299/tsx/input.tsx.json index 44c1a7310d24..1a275b00cdbb 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1299/tsx/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1299/tsx/input.tsx.json @@ -257,6 +257,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -279,6 +280,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1505/case1/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-1505/case1/input.tsx.json index a367722fa0e0..4092e2745311 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1505/case1/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1505/case1/input.tsx.json @@ -84,6 +84,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -106,6 +107,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -163,6 +165,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -538,6 +541,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1505/case2/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-1505/case2/input.tsx.json index 42c126269675..a92008ef21ee 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1505/case2/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1505/case2/input.tsx.json @@ -2772,6 +2772,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1526/case1/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-1526/case1/input.tsx.json index e25b8b05f1eb..a5bec3683549 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1526/case1/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1526/case1/input.tsx.json @@ -89,6 +89,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1526/case3/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-1526/case3/input.tsx.json index 0ba8d3e96f8f..90aa793e58fe 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1526/case3/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1526/case3/input.tsx.json @@ -89,6 +89,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-1526/case4/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-1526/case4/input.ts.json index 0ba8d3e96f8f..90aa793e58fe 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-1526/case4/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-1526/case4/input.ts.json @@ -89,6 +89,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-2040/case1/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-2040/case1/input.ts.json index 3ffedcdc3a7a..86e4f317b167 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-2040/case1/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-2040/case1/input.ts.json @@ -154,6 +154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-2040/case2/input.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-2040/case2/input.ts.json index 61d6daddf236..9e9166e38875 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-2040/case2/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-2040/case2/input.ts.json @@ -154,6 +154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsFunctionType", diff --git a/crates/swc_ecma_parser/tests/typescript/issue-2040/case3/input.tsx.json b/crates/swc_ecma_parser/tests/typescript/issue-2040/case3/input.tsx.json index 3ffedcdc3a7a..86e4f317b167 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-2040/case3/input.tsx.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-2040/case3/input.tsx.json @@ -154,6 +154,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { 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 c896b6cd80c4..448752e14441 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 @@ -188,6 +188,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/issue-4132/index.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-4132/index.ts.json index c6f06ee37b60..d70c95150a41 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-4132/index.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-4132/index.ts.json @@ -89,6 +89,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/issue-6430/index.ts.json b/crates/swc_ecma_parser/tests/typescript/issue-6430/index.ts.json index 69488bcb8b82..59472fec6697 100644 --- a/crates/swc_ecma_parser/tests/typescript/issue-6430/index.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/issue-6430/index.ts.json @@ -173,6 +173,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -287,6 +288,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -431,6 +433,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -545,6 +548,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -719,6 +723,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -967,6 +972,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1241,6 +1247,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1345,6 +1352,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/regression/tsx-issue-7742/input.ts.json b/crates/swc_ecma_parser/tests/typescript/regression/tsx-issue-7742/input.ts.json index 3f2a65a9b9b8..84d9c9ce7f94 100644 --- a/crates/swc_ecma_parser/tests/typescript/regression/tsx-issue-7742/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/regression/tsx-issue-7742/input.ts.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -165,6 +166,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/tsx/type-parameters/input.ts.json b/crates/swc_ecma_parser/tests/typescript/tsx/type-parameters/input.ts.json index e486a25730df..95a3d8026d63 100644 --- a/crates/swc_ecma_parser/tests/typescript/tsx/type-parameters/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/tsx/type-parameters/input.ts.json @@ -80,6 +80,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": 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 b8c2496fe84e..87c307374f41 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 @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/type-alias/generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/type-alias/generic/input.ts.json index b6d0a9718518..0da7ced6fab0 100644 --- a/crates/swc_ecma_parser/tests/typescript/type-alias/generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/type-alias/generic/input.ts.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/type-arguments/whitespace/input.ts.json b/crates/swc_ecma_parser/tests/typescript/type-arguments/whitespace/input.ts.json index 7c658e3d2a43..dbc26a92653a 100644 --- a/crates/swc_ecma_parser/tests/typescript/type-arguments/whitespace/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/type-arguments/whitespace/input.ts.json @@ -64,6 +64,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": 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 3df155dfc6ce..514961436a4f 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 @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsArrayType", "span": { @@ -140,6 +141,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -288,6 +290,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -425,6 +428,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -582,6 +586,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -757,6 +762,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -913,6 +919,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsFunctionType", "span": { @@ -1119,6 +1126,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1324,6 +1332,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -1461,6 +1470,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsConstructorType", "span": { @@ -1668,6 +1678,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -1916,6 +1927,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -2096,6 +2108,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2178,6 +2191,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2335,6 +2349,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2472,6 +2487,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2566,6 +2582,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -2737,6 +2754,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/distinguishing/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/distinguishing/input.ts.json index b1286258583e..b8e0572bbc7c 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/distinguishing/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/conditional-infer-extends/distinguishing/input.ts.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -122,6 +123,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -256,6 +258,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -334,6 +337,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -469,6 +473,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -533,6 +538,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -629,6 +635,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -686,6 +693,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -781,6 +789,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -846,6 +855,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -942,6 +952,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1000,6 +1011,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsConditionalType", "span": { @@ -1033,6 +1045,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1208,6 +1221,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1266,6 +1280,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsInferType", "span": { @@ -1292,6 +1307,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1429,6 +1445,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1487,6 +1504,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1550,6 +1568,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1713,6 +1732,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -1771,6 +1791,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1827,6 +1848,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeReference", "span": { diff --git a/crates/swc_ecma_parser/tests/typescript/types/conditional-infer/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/conditional-infer/input.ts.json index 5f346c42d297..1b7492069a51 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/conditional-infer/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/conditional-infer/input.ts.json @@ -51,6 +51,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -122,6 +123,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts.json index c5e87f439838..2a0832fec1f0 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/function-generic/input.ts.json @@ -112,6 +112,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_parser/tests/typescript/types/mapped/input.ts.json b/crates/swc_ecma_parser/tests/typescript/types/mapped/input.ts.json index 594dddf83c90..e42f71f674cc 100644 --- a/crates/swc_ecma_parser/tests/typescript/types/mapped/input.ts.json +++ b/crates/swc_ecma_parser/tests/typescript/types/mapped/input.ts.json @@ -66,6 +66,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -156,6 +157,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -246,6 +248,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -336,6 +339,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { @@ -426,6 +430,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsKeywordType", "span": { 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 f7c06ca4567b..40ca56ebce31 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 @@ -146,6 +146,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { 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 2781f5de2890..685a0c2841df 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 @@ -51,6 +51,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -393,6 +394,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -781,6 +783,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -1179,6 +1182,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -1249,6 +1253,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -1328,6 +1333,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null }, @@ -1350,6 +1356,7 @@ }, "in": false, "out": true, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1475,6 +1482,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -1582,6 +1590,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -1694,6 +1703,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -1773,6 +1783,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -1931,6 +1942,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -2099,6 +2111,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -2267,6 +2280,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -2458,6 +2472,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2610,6 +2625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2758,6 +2774,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -2949,6 +2966,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3101,6 +3119,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3249,6 +3268,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -3440,6 +3460,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3592,6 +3613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3740,6 +3762,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3810,6 +3833,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -3880,6 +3904,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -3950,6 +3975,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -4072,6 +4098,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4145,6 +4172,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4326,6 +4354,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -4387,6 +4416,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -4678,6 +4708,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -4936,6 +4967,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4958,6 +4990,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", @@ -5353,6 +5386,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5944,6 +5978,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5966,6 +6001,7 @@ }, "in": true, "out": true, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -6069,6 +6105,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -6395,6 +6432,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -6639,6 +6677,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": 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 2781f5de2890..685a0c2841df 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 @@ -51,6 +51,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -393,6 +394,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -781,6 +783,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -1179,6 +1182,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -1249,6 +1253,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -1328,6 +1333,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null }, @@ -1350,6 +1356,7 @@ }, "in": false, "out": true, + "const": false, "constraint": { "type": "TsTypeOperator", "span": { @@ -1475,6 +1482,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -1582,6 +1590,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -1694,6 +1703,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -1773,6 +1783,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -1931,6 +1942,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -2099,6 +2111,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -2267,6 +2280,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -2458,6 +2472,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2610,6 +2625,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -2758,6 +2774,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -2949,6 +2966,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3101,6 +3119,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3249,6 +3268,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -3440,6 +3460,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3592,6 +3613,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3740,6 +3762,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -3810,6 +3833,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -3880,6 +3904,7 @@ }, "in": true, "out": true, + "const": false, "constraint": null, "default": null } @@ -3950,6 +3975,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -4072,6 +4098,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4145,6 +4172,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -4326,6 +4354,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -4387,6 +4416,7 @@ }, "in": true, "out": false, + "const": false, "constraint": null, "default": null } @@ -4678,6 +4708,7 @@ }, "in": false, "out": true, + "const": false, "constraint": null, "default": null } @@ -4936,6 +4967,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -4958,6 +4990,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": { "type": "TsKeywordType", @@ -5353,6 +5386,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } @@ -5944,6 +5978,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null }, @@ -5966,6 +6001,7 @@ }, "in": true, "out": true, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -6069,6 +6105,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -6395,6 +6432,7 @@ }, "in": false, "out": false, + "const": false, "constraint": { "type": "TsTypeLiteral", "span": { @@ -6639,6 +6677,7 @@ }, "in": false, "out": false, + "const": false, "constraint": null, "default": null } diff --git a/crates/swc_ecma_visit/src/lib.rs b/crates/swc_ecma_visit/src/lib.rs index ddde6e709ade..03aef579cc9b 100644 --- a/crates/swc_ecma_visit/src/lib.rs +++ b/crates/swc_ecma_visit/src/lib.rs @@ -1405,6 +1405,7 @@ define!({ pub name: Ident, pub is_in: bool, pub is_out: bool, + pub is_const: bool, pub constraint: Option>, pub default: Option>, } diff --git a/crates/swc_estree_ast/src/typescript.rs b/crates/swc_estree_ast/src/typescript.rs index 8de866f8bc23..3be4a8a1b1f5 100644 --- a/crates/swc_estree_ast/src/typescript.rs +++ b/crates/swc_estree_ast/src/typescript.rs @@ -920,4 +920,6 @@ pub struct TSTypeParameter { pub is_in: bool, #[serde(default, rename = "out")] pub is_out: bool, + #[serde(default, rename = "const")] + pub is_const: bool, } diff --git a/crates/swc_estree_compat/src/babelify/typescript.rs b/crates/swc_estree_compat/src/babelify/typescript.rs index ee354d585db9..b9a93b5aab2f 100644 --- a/crates/swc_estree_compat/src/babelify/typescript.rs +++ b/crates/swc_estree_compat/src/babelify/typescript.rs @@ -128,6 +128,7 @@ impl Babelify for TsTypeParam { name: self.name.sym, is_in: self.is_in, is_out: self.is_out, + is_const: self.is_const, constraint: self.constraint.map(|c| Box::alloc().init(c.babelify(ctx))), default: self.default.map(|d| Box::alloc().init(d.babelify(ctx))), } diff --git a/crates/swc_estree_compat/src/swcify/typescript.rs b/crates/swc_estree_compat/src/swcify/typescript.rs index 9be83ae05816..06ca982c7863 100644 --- a/crates/swc_estree_compat/src/swcify/typescript.rs +++ b/crates/swc_estree_compat/src/swcify/typescript.rs @@ -63,6 +63,7 @@ impl Swcify for TSTypeParameter { name: Ident::new(self.name, span), is_in: self.is_in, is_out: self.is_out, + is_const: self.is_const, constraint: self.constraint.swcify(ctx), default: self.default.swcify(ctx), }